#5/7


#1

// Check if the user is ready to play!
confirm("Lets do this!");

var age=prompt("17");

console.log(age);

if(age < 13)
{
console.log("allowed to play but you take no responsibility");
}

else
{
console.log("go ahead have fun");
}

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 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.'")
}

//can someone point out where i went wrong?


#2

in this line:

if(userAnswer===yes)

yes is a string, so it should be:

if(userAnswer==="yes")

not something which is wrong, but why is this:

var age=prompt("17");

prompting for 17? why is not a question for the user age?


#3

idk i just felt like putting my age down honestly and it worked so.... ya thanks for all the help really :smile: