Skip to content

Instantly share code, notes, and snippets.

@krogowsk531
Created March 30, 2020 18:17
Show Gist options
  • Save krogowsk531/3c188520cd0b79de41ca893a6918a44e to your computer and use it in GitHub Desktop.
Save krogowsk531/3c188520cd0b79de41ca893a6918a44e to your computer and use it in GitHub Desktop.

Create HTML and CSS for Magic 8 Ball markup.

In HTML allow the ball to provide inital message without any functionality.

Work with JS to create functionaity.

Use querySelector to target the HTML message.

Use eventlistner to manage your clicks.

Create an array of messages.

Use math.floor and InnerHTML to randomize messages.

Create a function and call it to execute above functionality.

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