Im pretty sure that a lot of people have encountered this situation. For Ex: You have a simple Choose Your Own Adventure game from JS.
var name = prompt("Name?");
console.log("Hello" + name);
var age = prompt("Age?");
console.log(name + " is " + age + " years old");
what happens is the first prompt is shown and then the second prompt (age) is shown immediately afterwards. Also, the console doesn't even print out the "Hello" + (name) until after you answer the two prompts. Is there anyway you can "force-print" the console.log between the two prompts?
prompt(), you might as well usealert()for your outputs.