Code your own adventure asking for feedback:


#1

Please help, the game prints out but I am still encountering an error message.

Instructions:

Create a variable called feedback and prompt the user to rate your game out of 10.

If feedback is greater than 8, print out: "Thank you! We should race at the next concert!"

Otherwise, print out:
"I'll keep practicing coding and racing."

My solution:

//ask for feed back
var feedback= prompt("rate 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 codeing and racing.");
}

Error message:

Oops, try again. It looks like you didn't print the less than or equal to 8 message.
also tried :
if(feedback>=8)
if(feedback=8)
var feedback= prompt("rate game out of 10.")


#2

So you need to ask the user to rate you from 1 to 10. Save his answer in variable called feedback and check if rating is greater then 8 to print something, otherwise you print something else.

var feedback = prompt( "Rate me from 1 to 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.");
}

#3

Thank you! I missed spelled coding


#4

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