Apologies if this is a simple question, but is there a way to output Javascript to the console in real-time, while pausing at each user interaction. In other words, if I did something as simple as...
console.log("What's your name: ");
let userName = prompt("What is your name?");
console.log(userName);
console.log("\n");
console.log("Nice to meet you " + userName + "! What is your age?");
let userAge = prompt("What is your age?");
console.log(userAge);
...can I get the name outputted to the screen before the age prompt comes up? This is doable in other teaching environments (MS Basic & the command prompt), but either doesn't exist in Javascript, or I'm missing something.
Thanks for helping the newb!
console.log(userName). Do you want it to write to the document?Promise(). See this question.