Spin-off of Project Magic 8-Ball



In the logic challenges, you practiced if and else. Now, use that knowledge to program a magic 8-ball, so you can ask your programs for answers to all your deepest life questions.

1. Change the if() so it checks if the answer variable is a certain number. Click restart until you see the answer.
2. Add else if statements to check for all the possible values of the number. For each one, show a different message. For easy testing of particular answers, you can add a line like 'var answer = 1' below the line that generates a random numbers, and remove it when you're done. Then click restart and test it!
3. Bonus: Change the color for different answers or illustrate them somehow.