Feeling confuse T-T.What's wrong?


#1


#2

Hello @kizo12

On line 2, you have written "var age = 14;". The issue with this is that your code is supposed to ask the player to enter a value for age. You have done this correctly in line 3. So you don't need what you have written in line 2 at all.

On line 4, your if condition is written as "age is less than 13". Can you think of a way to rewrite this using a comparison operator? If you aren't sure what that is, review this link:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators


#3

Tks,i passed it.:grin::blush:


#4

var userAnswer=prompt("Do you want to raceBieber 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.'");
}

and
I am getting this error

Oops, try again. Did you add an if statement to your code?

can anyone help me out....


#5

check this yourself,remember that everything in the console.log must be exact 100% like in the instruction,even spaces.my English is very bad,so dont judge me =))


#6

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