Skip to content

Instantly share code, notes, and snippets.

@Leasw144
Last active March 30, 2020 17:53
Show Gist options
  • Select an option

  • Save Leasw144/67a3920c471c5721e6a8d67e6b6850ba to your computer and use it in GitHub Desktop.

Select an option

Save Leasw144/67a3920c471c5721e6a8d67e6b6850ba to your computer and use it in GitHub Desktop.
  1. create an app that works like a magic 8 ball
  2. create an Object Array
  3. each object in the array will have a key value pair of a number, and an answer from 0 to 8- for example {1: "better luck next time!"}
  4. create a function called shakeEight
  5. within the function, create variable, outcomeShake
  6. have outcomeShake equal Math.Random() function and multiply that by eightBallOutcomes.length
  7. return eightballOutcomes[outcomeShake]
  8. close function
  9. ?????
  10. Profit!!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment