Asking for feedback


#1

Hey guys i’m just kept on getting this error “Oops, try again. It looks like you didn’t print the less than or equal to 8 message.”

My code:

confirm(“Are you ready to play?”);
var age = prompt(“What’s your age”);
if(age < 13){
console.log(“you are allowed to play at your own risk”);
}else{
console.log(“Welcome”);
}
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;
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(“what is your rating out of 10?”);
if(feedback >= 8) {
console.log(“Thank you we will race another time!”);
}else{
console.log(“I’ll scoop you with ma scooper spooner!”);
}

Thanks for your help! really appreciated ^^


#2

Have used the EXACT text’s as is asked for ??
if so could you provide the link to the exrcise…??


#3

Hi Leonard
thx for your reply, I’ve just fixed it today

var feedback = prompt(“What is your game rating ?”);
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 am not sure what I did wrong but I just rewrote it

thx anyway :slight_smile:


#4

See any difference ??


#5

Lol yea I put a ; at the end of the “console.log(“I’ll scoop you with ma scooper spooner!”);” and “console.log
(“Thank you! We should race at the next concert!”)” missing the ; and missing the } at “console.log(“I’ll keep practicing coding and racing.”)”

I thought I got it right, guess there was a lot of mistake
thx for replying again


#6

but the cause was NOT using the EXACT texts as were required by the exercise !!!