SyntaxError: Unexpected token var


#1

confirm("I wish to proceed");
var age = prompt("What is your age?");
if (var age < 13) {
console.log("you are no allowed to go on" )
} else (var age > 13) {
console.log("Proceed");
}
help????


#2

else statement don't take any arguments or comparison. Remove the var age > 13 on line 5 .

confirm("I wish to proceed");
var age = prompt("What is your age?");
if (var age < 13) {
console.log("you are no allowed to go on" )
} else {
console.log("Proceed");
}


#3

else statement don't take any arguments or comparison. Remove the var age > 13 on line 5 .and replace it with var age < 13 on line 3

confirm("I wish to proceed");
var age = prompt("What is your age?");
if (var age > 13) {
console.log("you are no allowed to go on" )
} else {
console.log("Proceed");
}


#4

@kalicdeception do (age < 13) instead of (var age < 13) hoped i helped