📅  最后修改于: 2022-03-11 15:03:43.694000             🧑  作者: Mango
function isLeapYear(year) {
if (year % 4 == 0) {
console.log("leap year")
} else {
console.log("Not a leap year")
}
}
var myYear = 2020;
isLeapYear(myYear)
// Output:leap year