Help on asking for feed back


#1

// this is what i put and it says there is a SyntaxError: expected expresion, got keyword 'else'
confirm('we are ready to play');
var age = prompt("what's your age");
if(age < 13);
{
console.log('you are allowed to play but we take no responsibilty');
}
else
{
console.log('move on and enjoy the game');
}
console.log("You are at a Justin Bieber concert,and you hear this lyric 'Lace my shoes off, start racing.'");
("Suddenly, Bieber stops and says, 'who wants to race me?'");
var userAnswer = prompt("Do you want to race Bieber on stage?");
if(userAnswer = "yes");
{
console.log("You and Bieber start racing. It's neck to neck! You win by a shoelace!");
}
else
{
console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
var feedback = prompt('please rate the game on a scale of one to ten');
if(feedback > 8);
{
console.log("Thank you! We should race at the next concert!");
}
else
{
console.log("I'll keep practicing coding and racing.");
}


#2

First, you are missing a bracket after one of the else's. But that's not the problem.

What you need to know is that after if statements, you are NOT supposed to add semi colons after them. That is something you need to know, or nothing will work. The additional problem is that there are semi colons after your if statements, which do not work.

Add the extra bracket & take away all the semi colons after the if statements, and it's solved!

Hope it helped! :smiley: