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"