Skip to content

tata5/random-array-index-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Treehouse FSJS Techdegree - Project Warm Up

Random Array Index

Intro

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.

Instructions

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! :)

About

Random quote random array index

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published