Syntax Error


Syntax Error keeps coming up

confirm("I understand confirm!");
var age = prompt("What's your age");
if (age is less than 13)
    console.log("Your allowed to play but I take no responsibility");
console.log("Have fun playing");


HI this line

if (age is less than 13)

where you wrote is less you should put <


^ have a look at this line

To check two values you use the compassion operators

Comparisons : Explanation


if(age < 13) {


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