6-6 Asking for Feedback Help!


#1

I keep getting a TypeError: Prompt in not a function

// Check if the user is ready to play!
confirm("I understand confirm!");
var age = prompt("What's your age");
if (age < 13) {
console.log("You are allowed to play but I take no responsibility");
}
else {
console.log("Play on Hero!");
}
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?'")
userAnswer = prompt("Do you want to race Bieber on stage?")
if (prompt = "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");
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

You are missing semi colons at the end of a few console.log

Use two equal signs, as using one is to assign something not check


#3

Hi and here

userAnswer = prompt("Do you want to race Bieber on stage?")
if (prompt = "yes")

Its missing the var before userAnswer then you saved the prompt() inside the variable userAnswer so you should use it inside the if condition instead of prompt.