Skip to content
Created a Magic 8 Ball with JavaScript.
HTML JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
android-chrome-192x192.png
android-chrome-512x512.png
apple-touch-icon.png
favicon-16x16.png
favicon-32x32.png
favicon.ico
index.html
main.js
site.webmanifest
styles.css

README.md

js-magic-8-ball

Created a Magic 8 Ball with JavaScript. View the site here: https://dayrentolliver.com/js-magic-8-ball/

Author(s):

Dayren Tolliver

Technologies:

  • HTML
  • CSS
  • JavaScript

How it works:

  1. Enter a question into the first text field
  2. Press the 'Get my prediction' button
  3. Your prediction will appear in the second text field
  4. Repeat the steps above for mutliple questions

Things I learned:

  • How to manipulate the DOM
  • How to return strings at random

Future Features

  • Require question input before allowing submit
  • Add a 'Try Again' button
    • After clicking 'Try Again', the question area will clear
You can’t perform that action at this time.