Problem with 4. First move!


#1

Hello, keep getting a "Oops, try again. There was a problem with your syntax" error. To me it all looks right.

// Check if the user is ready to play!
confirm("Are Ready to Ruuuuumble?");
var age = prompt("what's your age");
if(age<13) {
console.log("get moms permission")}
else{
console.log("spend some money!")}
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?".)

I copied and pasted everything, refreshed, and reset code but error still persists. The one thing I notice is that the "13" in the "if(age<13)" line is red in color.


#2

Remove the period at this line var userAnswer = prompt("Do you want to race Bieber on stage?".)

it should look like this
var userAnswer = prompt("Do you want to race Bieber on stage?");


#3

You sir, are awesome!!! thanks a bunch, I wuz stuck for like 2 hours.


#4

confirm("I am ready to play!");
var age = prompt("What's your age");
if(age < 13)
{
console.log("You are too young to play this game!");
} else {
console.log("Let's begin");
}
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?");

I don't know where I'm going wrong here. Can someone please help!


#5

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

remove the {}


#6

I need some help with my code !! please !

// Check if the user is ready to play!
console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
confirm("I am ready to play!");
var age = prompt("what's your age");
if (age < 13)
{
** console.log("you are allowed to play without any responsibility");**
}
else
{
** console.log("still go on !");**
}
console.log("Suddenly, Bieber stops and says,'
who wants to race me ?'");
var userAnswer = prompt("Do you want to race Bieber on stage?");

and I am getting this output

Oops, try again. Did you remember to console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'"); ?


#7

Hi here where the error is

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

you should took the string exatly like they gave you so it should be like that.

"Suddenly, Bieber stops and says, 'Who wants to race me?'"

#8

Thanks ! it worked for me.


#9

Thanks wizmarco!
It worked for me as well :slightly_smiling:


#10

I was also keep getting the same error instruction every time: "Oops, try again. There was a problem with your syntax. " I have passed previous three sections, so I assume that those parts are correct. My coding is reproduced below:

console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer = prompt("Do you want to race Bieber on stage?");

Can anyone help me? Thank you all very much.


#11

Hi can you post all your code ?


#12

I'm having trouble with this exercise. receiving error message saying, 'did you set var userAnswer equal to the result of prompting the user.'

confirm("are you ready to play?")
prompt("whats your age");
var age= "whats your age";
if (age <13){
console.log("you are allowed to play but we take no responsibility");
}else{
console.log("all good");
}
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?")

help would be greatly appreciated, thanks


#13

Hi this part

prompt("whats your age");
var age= "whats your age";

You should do it like that

var age = prompt("whats your age");

#14

thanks, still having the issue with the second prompt

'''
confirm("are you ready to play?");
var age=prompt("whats your age");
if (age <13){
console.log("you are allowed to play but we take no responsibility");
}else{
console.log("all good");
}
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?");
'''
I haven't been able to complete any of the prompt sections, starting to think it may be browser related, but I have no basis for that thought.


#15

Hi, yes you should try to change browser , because I test your code and it work fine