Prompts appear before the story



The prompt boxes appear in correct order before any story text is printed out. Below is my code and a solution I found to this problem. As there seemed to have been no additional discussion, I was wondering if anyone could confirm that this is why the issue is there and that the suggested solution is the only way out.

The code:
// Check if the user is ready to play!
confirm("Are you ready?");
var age = prompt("What's your age?");
if (age < 13){
console.log("Little too young and therefore I accept no responsibility");
console.log("Great: let's continue the adventure!");
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!");
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 form 0 to 10!");
if (feedback >8){
console.log("Thank you! We should race at the next concert!");}
console.log("I'll keep practicing coding and racing.");}

The comment:

Thank you.


I think that this happens in certain browsers. I don't remember which do it and which don't though.

Which OS/browser combo are you using?
Are you able to try in a different browser for comparison?


OS X 10.10.2 + Safari 8.0.3
Have not yet tried on other combinations.


Found this thread because I got the same results, and I wasn't sure if it was to be expected with this code.

OS X 10.11.2, Safari 9.0.2.


I get the same problem on OS X with Safari.

Firefox and Chrome work fine