Debugs


#1

// Check if the user is ready to play!
var age =prompt("what is your age?");
if (age<13) {
console.log("you'r allowed to play but i take no responsibilities");
}
else{
console.log("so go on what ur waiting for :)");
}
console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!'");
console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer=prompt("Do you want to race bieberon stage?");
if (userAnswer==="yes"){
consol.log("You and Bieber start racing. It's neck and 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.'");
}

//guys would any one find the bugs here !! plz


#2

// Check if the user is ready to play!
var age = prompt("what is your age?");
if (age < 13)
{
console.log("you'r allowed to play but i take no responsibilities");
}
else
{
console.log("so go on what ur waiting for")
}
console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!'");
console.log("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 and 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.'");
}

Try that.


#3

There is a typo curly brace did not start for if(userAnswer = "Yes") {

and also , I have tried this code several times.. did not run!