Answer: With the help of
getFullYear() function of
Date() Object ,we can get current Year.
function get_current_year()
{
var date = new Date();
alert(date.getFullYear());
}
It will show current year as 2013.
Asked In: Many Interviews |
Alert Moderator