Console.log confusion! Please help!


#1

Please could someone tell me what I'm doing wrong? As you can see I am being instructed to console.log the sentence on line 7 which I have done. Confused...


#2

Missing a comma after the word Suddenly, this lesson is really picky with having the exact text asked for.


#3

Thank you. I noticed that and added it but am getting the same outcome..


#4

Remove the space before the start of that sentence, between the bracket and the "

console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");

if that doesn't work refresh the browser, and if it still wont work copy and paste the text in from the instructions


#5

I copied and pasted it and it worked! Thanks Benjnev!! :slightly_smiling:


#6

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;

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

I GOT[Oops, try again. Did you add an if statement to your code?]
pleeaaase help


#7

It should be like this:

var userAnswer = prompt("Do you want to race Bieber on stage?");

You don't need the first var userAnswer;


#8

i changed my code as like you said..
but still got the same erorrrr


#9

I've got it!! For your if statement put:

if("yes")

You do not need the userAnswer == before "yes".


#10