js date year code example
Example 1: how to get the year in javascript
new Date().getFullYear(); // This will get you the current year
Example 2: JS date year
var d = new Date();
var n = d.getFullYear();
Example 3: get year from date javascript
document.write(new Date().getFullYear());