Monday, March 14, 2011

Ex 2.5 if you do what I say...

This took a few minutes because I forgot to erase the } from the previous code... pay attention...


var ans = prompt("Hi, we need to test if the 4 key is working. Could you answer how much is 2 + 2 = ?", "just press the 4 key");
if (ans == "4"
  alert("The #4 keys are working perfectly, Thank you!");
else if (ans == "3" || ans == "5"
  alert("The key next to it...");
     else 
       alert("come on idiot, JUST PRESS THE 4 KEY!...");

No comments:

Post a Comment