The story heats up


#1


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

my program runs if i enter yes to race justin, but i receive an error if i decline, i get an error stating my console is not defined

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


#2

sorry here is the code

// Check if the user is ready to play!
confirm("Esta listo?")
var age= prompt ("How old are you?");
if(age<13)
{
  console.log("Yay!You are still young and beautiful.");
}
else 

{
    console.log("Yikes! Ugly and old af");
    
}

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(userAnswer==='yes')
{
    console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!");
}
else
{
    conosle.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}

#3

Spelling error, you have conosle instead of console


#4

A post was split to a new topic: 5. The story heats up!