https://github.com/thatgirldorian/roll-a-dice-app
This is an app for when you can't decide who's right, what to do or where to eat. Just roll a dice!
https://github.com/thatgirldorian/roll-a-dice-app
html-css javascript
Last synced: 4 months ago
JSON representation
This is an app for when you can't decide who's right, what to do or where to eat. Just roll a dice!
- Host: GitHub
- URL: https://github.com/thatgirldorian/roll-a-dice-app
- Owner: thatgirldorian
- Created: 2022-01-17T21:35:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-03T20:36:15.000Z (over 3 years ago)
- Last Synced: 2025-01-03T18:23:16.134Z (5 months ago)
- Topics: html-css, javascript
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Roll-a-Dice-App
This is an app for when you can't decide who's right or where to eat. Just roll a dice!
Function & Description:
This is an app that lets you roll a dice to make decisions. I added two buttons: one for randomising each outcome and another for refreshing the page + reloading the window. This second button refreshes the page.Issues solutions faced and solutions:
- At first, I struggled with how to randomise the images but I was able to put them in an array and used a function alongside some Math methods to pick them out randomly.
- Also, I did not know how to tell when one image was greater than the other at first. So, I created a variable for each set image at any given time, got their index with the indexOf method and then used this in an if statement.
Technology Used:
- HTML
- CSS
- JavaScript
- GitHubScreenshot:
![]()