Created
July 30, 2014 21:21
-
-
Save Bijesse/a61b270ea27ed2b8a1f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Simple elseif</title> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tail = prompt("Do you have a tail?"); | |
var color = prompt("What color are you?"); | |
if (tail == "yes" && color == "green") | |
{ | |
console.log("You are Rex the dinosaur!"); | |
} | |
else if (tail == "yes" && color == "brown") | |
{ | |
console.log("You are Slinky the dog!"); | |
} | |
else | |
{ | |
console.log("Who are you?!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment