0
What's wrong with this code ? was trying to make a Program that could detect if it's a leap year or not ...?¿
alert ("Find out if it's leap year") var year=prompt("Enter the passing year") switch (year){ case year/4===0: document.write("Leap year"); default: document.write("Normal"); }
2 Réponses
+ 3
/ return you the quotient of division not remainder.
try% instead of / for your desired result.
+ 2
please ask Google for leap year rules.