Dealing with functions, arrays and random numbers is everyday work for a developer. These concepts are utilized in the Random Quote project. Here’s some lightweight practice with functions, arrays and random numbers. You’ll use JavaScript to create a function that grabs a random number from an array. And then you'll call that function a couple of times to simulate a dice roll game between two players.
Load the index.html
file in Chrome and open the Chrome DevTools console. If you don't know how to do that, please reach out in Slack. Next, follow along with the comments in the js/script.js
file to complete this challenge. When you are done, clicking the play button will reveal on the page and in the console, two random numbers for two players competing to get the highest number.
If you get stuck or have questions, reach out in the #code-adventures
channel in your Slack team.
Best of luck and happy coding! :)