Let's do some experiments! One thing computers are great at is doing the same thing over and over and over again, so let's use that to see how random the random function in JavaScript is. In the index.js there is an explanation of what to implement. In essence we want to simulate the rolling of a die a lot of times and then track how many times a certain value was rolled.
- The
valueCountsis implemented as an array. Do you think there is another way to store this? Why do you think the decision was made to go with an array? - What do you think about the code division? Would you add another function or maybe remove one? Why?