The story heats UP


#1

Hi i need help with my code....

https://gyazo.com/b1011f53ec9b8d123faf8933b337c4e0

´´´
confirm("I am ready to play!");
var age = prompt("What's your age");
if(age > 13);
{
console.log("You are allowed to play");
}
else
{
console.log("Play on!");
}
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(userAnswer=="no");
{
console.log("Oh no! Bieber sheakes his head and sings 'Iset a pace, so i can race without pacing'")
}

´´´


#2

HI this line remove the ;

if(age > 13); <--

and this part

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?");

put it like that

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?");

#3

https://gyazo.com/42db396c3e9996287e73fc00cbca84c8 it is in the right order..?


#4

if you look at the number of the line you have 11.. it's because you put two console.log()s on the same line change it like I said like that

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?");

#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.