How to get current year in JavaScript

Datetime
By Jad Joubran · 
Last updated Jan 04, 2018
const date = new Date();

const year = date.getFullYear();
2018