How to get current Year in Javascript?

 Posted by vishalneeraj-24503 on 12/19/2013 | Category: JavaScript Interview questions | Views: 2561 | Points: 40

With the help of getFullYear() function of Date() Object ,we can get current Year.

function get_current_year() 

var date = new Date();

It will show current year as 2013.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response