Skip to content

Instantly share code, notes, and snippets.

@Bijesse
Created July 30, 2014 21:49
Show Gist options
  • Save Bijesse/dc21d9f4bcdf84157aa1 to your computer and use it in GitHub Desktop.
Save Bijesse/dc21d9f4bcdf84157aa1 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Find Nemo</title>
</head>
<body>
A game using nesting if/else
</body>
</html>
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