How to get current year in JavaScript

Datetime
Last updated Jan 04, 2018
cosnt date = new Date();

const year = date.getFullYear()
2018