Cant get the code to work


this my code why wont it work
var age = prompt("what's your age");
if(age is less than 13)
console.log("you shall not pass");
else(age is over 13)
console.log("the way is open to you");



Hi this line

if(age is less than 13)

you put < instead of is less than


it still says there is an unexpected identifier


And this line

else(age is over 13)

remove (age is over 13)


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.