The story heats up Syntax


#1


https://www.codecademy.com/courses/javascript-beginner-en-x9DnD/0/5?curriculum_id=506324b3a7dffd00020bf661#

ReferenceError: control is not defined


// Check if the user is ready to play!
confirm("I am ready to play!")
var age = prompt("what's your age");
if(age <= 13)
{
    console.log("You're able to play the game but we do not take any responsibility for your action's")
}
else
{
    console.log("Have fun!")
}

//This is the intro to the story
console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");

//storyline
console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer = prompt("Do you want to race Bieber on stage?")

//The story heats up
if(userAnswer === 'yes')
{
    control.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!")
}
else
{
    control.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'")
}


#2

I can't seem to figure out why this will not work someone please help!


#3

Not sure what you meant with control.log, it should be console.log


#4

Does anybody know why all the prompt messages first pop up and the console log is only shown right at the end? The storyline cannot be followed until I have filled in the feedback score.
Thanks


#5

This is a new CodeAcademy thing. When I completed this lesson 2 years ago it logged to the console at the point the console.log was placed.


#6

Great! Thank you for your answer.