Created
February 6, 2015 03:26
-
-
Save breanneboland/3c00757bdc430f447e82 to your computer and use it in GitHub Desktop.
This file contains 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
<script> | |
var guess; | |
guess = prompt("What color am I thinking of?"); | |
switch(guess) { | |
case 'yellow': | |
alert("Mmm, nope, but it's half the answer."); | |
break; | |
case 'red': | |
alert("Warmer. Slightly too warm, actually.") | |
break; | |
case 'blue': | |
alert("Less sky, more grass."); | |
break; | |
case 'green': | |
alert("YOU ARE THE WINNER! No, you don't win anything. But you guessed a thing right. Enjoy the self-esteem boost."); | |
break; | |
case 'orange': | |
alert("That is a flavor, not a color. Don't contradict me."); | |
break; | |
case 'purple': | |
alert("Wrong, but now I kind of wish I'd thought of that instead."); | |
break; | |
case 'indigo': | |
alert("Newton was being superstitious with this stuff. Stop it."); | |
break; | |
default: | |
alert("That is not a color, or at least not one my human overlord saw fit to put in her homework.") | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment