Created
July 30, 2014 21:49
-
-
Save Bijesse/dc21d9f4bcdf84157aa1 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>Find Nemo</title> | |
</head> | |
<body> | |
A game using nesting if/else | |
</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 fish = prompt("Are you a fish?"); | |
if (fish == "yes") | |
{ | |
var color = prompt("what color are you?"); | |
if(color == "blue") | |
{ | |
console.log("You are Dory!"); | |
} | |
else if (color + "orange") | |
{ | |
console.log("I found Nemo!"); | |
} | |
} | |
else if (fish == "no") | |
{ | |
console.log("You are bruce!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment