Im confused the error says to inclulde yes into the answer section


#1

I'm confused

// Check if the user is ready to play!
console.log("Are you ready to play?");
confirm("I am ready to play.");
var age = prompt("What's your age");
if (age < 13)
{
console.log;("This is a warning");
} else {
console.log("Wonderful");
}
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 (answer = "yes")
{
console.log("Okay Ready? Set? GO!")
}


#2

remove the ; after console.log

console.log;("This is a warning");

and here

if (answer = "yes")

we use = for assignment and whether two values are equal or not we use ==(equal value) or ===(equal value and equal type)


#3

// Check if the user is ready to play!
console.log("Are you ready to play?");
confirm("I am ready to play.");
var age = prompt("What's your age");
if (age < 13)
{
console.log;("This is a warning")
} else {
console.log("Wonderful");
}
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 (answer = "yes");
{
console.log("Okay Ready? Set? GO!")
}
So your saying it should look something like this?


#4

did you understand what i said?

you didn't change anything

in you code

if (age < 13)
{
console.log;("This is a warning") // remove ; from here
} else {
console.log("Wonderful");
}

and here

if (answer = "yes"); // here use == or ===
{
console.log("Okay Ready? Set? GO!")
}

#5

Ohhh okay thank you fro helping me out with this


#6

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