📅  最后修改于: 2022-03-11 15:04:29.279000             🧑  作者: Mango
const year = prompt("enter year");
debugger;
if(year%4==0){
if(year%100==0){
if(year%400==0){
console.log(year + " is leap year")
}
else{
console.log(year + " is not a leap year");
}
}else {
console.log(year +" is a leap year");
}
}else {
console.log("the year "+ year + "is not a leap year");
}