Answers for "how to console.log while using a prompt in javascript"

0

how to console.log while using a prompt in javascript

var name = prompt("Name?");
console.log("Hello " + name);

// Force a 10 millisecond delay before running the rest of the code.
setTimeout(function(){
  var age = prompt("Age?");
  console.log(name + " is " + age + " years old");
}, 10);
Posted by: Guest on March-29-2021

Code answers related to "how to console.log while using a prompt in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language