Chrome asks all prompts before printing to console


#1


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


I passed everything nicely but chrome asks all my prompts and questions before printing anything to console. Is this just a chrome issue?


// 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("We take no responsibility for any damage that may occur")
}
else {
    console.log("Let's get started!");
}
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 this game 0 - 10")
if (feedback > 8) {
    console.log("Thank you! We should race at the next concert!")
}
else {
    console.log("I'll keep practicing coding and racing.")
}


#2

@arcpro57501,
Try by doing the answer to the Original Post in
http://stackoverflow.com/questions/35419105/is-there-a-way-to-manipulate-the-timing-between-console-log-output-and-the-next/35419165
and see if it still exists ??


#3

I get this error: repl.html:1 Uncaught TypeError: Cannot read property 'push' of undefined(…)


#4

@arcpro57501
it would be interresting to know what is presented after undefined....where you put (...)


#5

I actually just tried it again to check what you're talking about and it worked!
I think the issue was that i pasted that into the console while I was inside another lesson


#6

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