how to get the year in javascript
snippet in javascript

Javascript get current year

user2877

var currentYear= new Date().getFullYear(); 

how to get the year in javascript

user2589

new Date().getFullYear(); // This will get you the current year

get year from date javascript

user1430

document.write(new Date().getFullYear());