Asking for feedback!


#1

Anybody know what I'm doing wrong here?

// Check if the user is ready to play!
confirm("Ready")
var age = prompt("What's your age?");
if(age <13) {
{
console.log("You are too young to play this game but if you play we don't take any responsiblity")
}
else
console.log("Enjoy the game!")
{

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

var feedback = prompt("please rate this basic game out of 10")
if(feedback <8)
console.log("Thank you! We should race at the next concert!")
}
else
{
console.log("I'll keep practicing coding and racing.")


#2

confirm("Ready")
var age = prompt("What's your age?");
if(age <13) {
{ // <<< two times { remove one
console.log("You are too young to play this game but if you play we don't take any responsiblity")
}
else // << console.log("Enjoy the game!")
{ // <<< why you open here it must be }

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") {
{ // <<< again two times open
console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!")
}
} else // <<< again missing {
console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'")
}

var feedback = prompt("please rate this basic game out of 10")
if(feedback <8) // <<< again not open
console.log("Thank you! We should race at the next concert!")
}
else
{
console.log("I'll keep practicing coding and racing.")
// <<< again missing closing }

Go an change that all


#3

Okay I have changed it but now I get a SyntaxError: ParserError
Here is the changed code

// Check if the user is ready to play!
confirm("Ready")
var age = prompt("What's your age?");
if(age <13)
{
console.log("You are too young to play this game but if you play we don't take any responsiblity")
}
else
console.log("Enjoy the game!")
}

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

var feedback = prompt("please rate this basic game out of 10")
if(feedback <8)
console.log("Thank you! We should race at the next concert!")
}
else
{
console.log("I'll keep practicing coding and racing.")
}


#4

Please check all your curly Brackets i see missing and to much curly brackets


#5

Sorry but I have already looked and am not sure where they are missing and your first reply was a little hard to understand.

var feedback = prompt("please rate this basic game out of 10")
if(feedback <8) // <<< again not open
console.log("Thank you! We should race at the next concert!")

You say 'again not open' but where should it be open?


#6

I don't know where to fill in

Please help me :confounded:


#7

I am getting the same syntax error message.

var feedback= prompt ( "Rate this game 1 out of 10." );
if (feedback>8)
{ console.log ( "Thank you! We should race at the next concert!" );
}
else
{ console.log ( "I'll keep practicing coding and racing.");
}
I thought the code was pretty clean and I am going nuts looking for the error.


#8

How do you create a if else statement?

if (something must be True) {
  do here something
} else {
  do that 
}

And now look at my curly brackets !
And compare that with your code.


#9

Your Code looks good for me.
And if i try i can pass.

Please try a other browser or clean your cache


#10

I was wondering if my browser is the problem; I keep getting stuck in weird places where I shouldn't be, even thought the code is acceptable. How do I clean my cache? And thank you for responding!


#11

Shift + Ctrl + R Loads the Site without using the cache.


#12

Welp, I cleaned the cache and did the lesson in another browser. Stuck again! This time at part 5...
console.log ( "Are you ready to play?" );
confirm ( "Yes! Here we go!" );
var age= prompt ( "What's your age" );
if (age<13)
{console.log( "You can play, but I am not responsible." );
}
else
{console.log( "Let's do this!" );
}
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.' " );
}


#13

Hmm..

So am I not getting help? :rage:


#14

Other Browser same Code and this code doesnt work?

hmmm curios


#15

Found the mistake:

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

where is the closing "
Add it and the code will work