Adventure game problem


It asks my age, whatever i put in there it sends my straight to "Do you want to race Bieber on stage?"
I dont think my if else statements are correct. Though code academy says it was right.

confirm("Are you ready to play?");

var age = prompt("Whats your age?");

if (age < 13) {

    console.log("You can play but i take no responsibility");

} else {
    console.log("You can play! Goodluck!");

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 {
    console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so i can race without pacing.'");

var feedback = prompt("Rate my game out of 10.");
if (feedback > 8) {
    console.log("Thankyou! We should race at the next concert!");
} else {
    console.log("I'll keep practicing coding and racing.");


HI it's right..let says you put a age under 13 it will print

"You can play but i take no responsibility"

and if you put a age over 13 it will print

"You can play! Goodluck!"

and after that it's right the it aske you

"Do you want to race Bieber on stage?"



But when i copy my code and wack it in the console using the inspect tool on chrome, it doesn't work.


I don't know about that try it here


Hmm, its odd, when i run it the console logs are wrong, and yet on the right hand side in the black box, they are correct.


Only the prompts are working, not the console.logs.


Are you sure

the firt line is the console.log() in the else statement

console.log("You can play! Goodluck!")


I think i understand now, should console.logs produce a popup box like the prompt does? I was wondering why the console.logs weren't popping up like the prompts do.


no the console just log your string (that contain the story) the prompt aske you something to input... and no since you didn't print the prompt it won't be print.


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