,

Day 31: Magic 8 Ball (Complete)

Today I finished the magic 8 ball. I decided to animate the ball shaking before displaying the answer. The answer is chosen from a list of possible answered stored in an array.

A random number is chosen within the array and used to select the answer. I use the CSS transform property to shake the ball, and a timer to increment it for animation. The project can be found here: https://zidri.github.io/Magic8Ball/ or on by GitHub.