Explore BrainMass

Keep track of randomly numbers in javascript array

Please see the attached file.
Both 17.9 and 17.10 should be done but only one HTML file is needed for including both requirements.


Solution Preview

The main work for this solution is done in the Javascript function that calculates the statistics for die rolls. The algorithm is to roll the die the specified number of times and store the roll count in an array. Our array is from 0 to 11 which represents the numbers 1 to 12. The number 1 will never be rolled but it is more convenient to have the array ...

Solution Summary

This solution shows how to generate random numbers in javascript and how to store them in an array.