Skip to content

Instantly share code, notes, and snippets.

@st0nebreaker
Last active March 30, 2020 17:20
Show Gist options
  • Save st0nebreaker/572369e7127fa767a9754c1e86b70055 to your computer and use it in GitHub Desktop.
Save st0nebreaker/572369e7127fa767a9754c1e86b70055 to your computer and use it in GitHub Desktop.
Magic 8 Ball - Pseudo Code
  • Use HTML elements to create a virtual ball

  • Insert either CSS rules or JS functionality to make the ball spin around slowly

  • Create array of Magic 8 Ball fortunes

  • JS event listener + query selectors (or other DOM functions), will respond when the 8 Ball is clicked

  • A getRandomIndex function will pop up the random fortune for the user (the eventHandler)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment