What is wrong with this code!


confirm("I am ready to play!");
var age = prompt("What's your age");
if(age < 13)
console.log("You can play, but we take no responsibility!");
console.log("Play on!");

I love learning about Javam but this code is making me insane. What is wrong, please tell me! The system says: "SyntaxError: expected expression, got keyword 'else'"


try after refresh your page.

dont worry :slight_smile: the good thing is you'll learn from your mistake.


It didn't help.But the code seems correct, right?


yes, your code is right.couldn't you pass the lesson?


The code is , Right !


No, I'm not able to pass the lesson. Until it happens, my java learning will be on hold.

Hent Outlook til Androidhttps://aka.ms/ghei36


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