Java - Display Problem w. Create Your Own Adventure Exercise


#1

Hi, I'm having some problems with things displaying the to correct order. The way it's supposed to go is...

-
-PROMPT-#1 user confirms the are ready to begin
-DISPLAY TEXT-#1 Java displays message "Lets Begin"
-PROMPT-#2 user inputs age
-DISPLAY TEXT-#2 Java displays a story line.
-PROMPT-#3 User is prompted to chose Yes or No to continue the story
-DISPLAY TEXT-#3 Java displays second part of story based on user's choice.

What is actually happening when I run the code is:

-PROMPT-#1 user confirms the are ready to begin
-PROMPT-#2 user inputs age
-PROMPT-#3 User is prompted to chose Yes or No to continue the story
-DISPLAY TEXT-#1 Java displays message "Lets Begin"
-DISPLAY TEXT-#2 Java displays a story line.
-DISPLAY TEXT-#3 Java displays second part of story based on user's choice.

I'm not sure what I'm doing wrong. Is there a way to pause after each prompt so that the text will have time to display?

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

JAVA - CODE YOUR OWN ADVENTURE EXERCISE:

confirm("I am ready to play!");

var age = prompt("What's your age?");

if (age >= 13)

{
console.log("Let's begin.");
}

else

{
console.log("So sorry! This game isn't for you. You can still play. But we are not responsible if your brain begins to warp or liquify. ")
}

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 climb onto the stage.");
}

else

{
console.log("You run out of the theater, and buy some cheesy garlic fries.");
}


#2

I'm pretty sure that's how it's supposed to work. It's not like it gives any errors or anything.

(Java != JavaScript)