how to repeat prompt with the same variable in javascript

Solutions on MaxInterview for how to repeat prompt with the same variable in javascript by the best coders in the world

showing results for - "how to repeat prompt with the same variable in javascript"
Céleste
28 Apr 2019
1var promtptAll = prompt('type any from rock, paper, scissors', '');
Hanna
08 Jun 2019
1let sign = prompt("What's your sign?");
2
3if (sign.toLowerCase() == "scorpio") {
4  alert("Wow! I'm a Scorpio too!");
5}
6
7// there are many ways to use the prompt feature
8sign = window.prompt(); // open the blank prompt window
9sign = prompt();       //  open the blank prompt window
10sign = window.prompt('Are you feeling lucky'); // open the window with Text "Are you feeling lucky"
11sign = window.prompt('Are you feeling lucky', 'sure'); // open the window with Text "Are you feeling lucky" and default value "sure"