📜  查找年份 javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:29.279000             🧑  作者: Mango

代码示例2
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");
}