How to get Leap Year using javascript ?

dhirenkaunar-15094
Posted by dhirenkaunar-15094 under JavaScript category on | Points: 40 | Views : 10249
function isleap(year) {
var yr = year.value;
var isLeap = false;
if (yr % 400 == 0 || (yr % 100 != 0 && yr % 4 == 0)) {
isLeap = true;
}
else {
isLeap = false;
}
return isLeap;
}

Comments or Responses

Login to post response