Difference between revisions of "JavaScript Prompt"

From Level Access Web Labs
Jump to navigation Jump to search
Line 4: Line 4:
 
function showPrompt() {
 
function showPrompt() {
 
   var pizza = prompt("Please enter your Fav Pizza", "Veggie, cheese, etc.");
 
   var pizza = prompt("Please enter your Fav Pizza", "Veggie, cheese, etc.");
   if (person != null) {
+
   if (pizza != null) {
 
     document.getElementById("demo").innerHTML =
 
     document.getElementById("demo").innerHTML =
 
     "Hello you like " + pizza + " ";
 
     "Hello you like " + pizza + " ";

Revision as of 22:59, 7 February 2019