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