<script>
function run(year) {
let a = false;
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
a = true;
}
return a;
}
console.log(run(2000));
console.log(run(2021));
</script>
标签:function,判断,console,函数,闰年,400,year,run,log
来源: https://www.cnblogs.com/0722tian/p/16138570.html