6. Asking for feedback


#1

// Check if the user is ready to play!
confirm("Are you ready to play?");
var age = prompt("What's your age");

if (age < 13)
{
console.log("You're allowed to play but I don't take responsibility");
}
else
{
console.log("You're allowed to play");
}

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("Rate the game 1-10");

if ("feedback" > 8) {
console.log("Thank you! We should race at the next concert!");
}
else {
console.log("I'll keep practicing and racing.");
}

I'm sorry guys but I can't really find the error.
I'm stuck, I can't go on and I don't understand why... Where's wrong?

"Oops, try again. It looks like you didn't print the less than or equal to 8 message."
This is the answer I have every single time.

Thanks for check it.


Asking for feedback nr 6
#2

Don't put userAnswer between quotation marks, because it's a variable not string :slight_smile:


#3

@wacco23
If you write

"feedback"

you are expressing a string Value "feedback"
instead of the required variable

feedback

and
use the EXACT text's as mentioned in the Instructions


#4

Thank you guys, I was getting mad, now I can go on.
I appreciate!