Help With console.log


#1

Please find the mistake in my code;

confirm("Are you ready to play?")
var age = prompt("Whats's your age?")
if(age > 13) {("Lets play!")} else {(console.log("You may play but I am not responsible"))}
console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'")
console.log("Suddenly, Beiber stops and says,'Who wants to race me?'")
var userAnswer = prompt("Do you want to race Beiber on stage?")

When I hit save & submit code it pops up with this message; Oops, try again. Did you remember to console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'"); ?


#2

You need to put semi colons after every console.log: remember that.


#4

I put the semi colons in and it still pops up with the same error message


#5

I was not able to debug it. I'm sorry, but I am not very good at debugging. So, I am giving you a piece of my code, and yours. It'll show the difference between yours and mine. And don't worry: mine is correct. :smiley:
Yours:

 confirm("Are you ready to play?")
var age = prompt("Whats's your age?")
if(age > 13) {("Lets play!")} else {(console.log("You may play but I am not responsible"))}
console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'")
console.log("Suddenly, Beiber stops and says,'Who wants to race me?'")
var userAnswer = prompt("Do you want to race Beiber on stage?")

Mine:

confirm("Are you ready to play?")

var age = prompt("What's your age?");

if(age < 13)
{
    console.log("We allow you to play, but we do not take any responsibilty.");
}
else
{
    console.log("Have a happy time playing!");
}

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

Using yours and mine, we can compare and find out what is the problem. :wink: