Syntax error on 6/7


#1

can anyone tell me what's wrong?

// Check if the user is ready to play!
confirm("I am ready to play");
var age = prompt("what's your age?")
if(age > 13){
console.log("you can play but i didnt let you, okay.")}
else{
console.log("go ahead you can play")}

console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'")

console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'")
var userAnswer = prompt("do you want to race Beiber on stage?");
if("userAnswer" === "yes"){
console.log("You and Bieber start racing. its neck and neck! You win by a shoelace!")}
else{
("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'")}

var feedback = prompt("what would you rate this game out of 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

Your feedback variable does not need to be in quotes, and you are missing a couple of semicolons.

Try this:

if (feedback > 8) {
console.log("Thank you! we should race at the next concert!");
}
else {
console.log("I'll keep practicing coding and racing.");
}

Also, at the beginning of your code, I believe you meant to type if(age < 13) not if(age > 13)