1d6 Simulation

Example of simulating many rolls of a 1d6 (a six sided die) using the random(min, max), and Math.floor(num) functions.
This program chooses and displays a random number and the total number of 1s, 2s, 3s, 4s, 5s, and 6s that have been rolled since the page was reloaded.

Since the random number generator is uniform, each of the numbers is equally probable and therefore, the total rolls of each of the six numbers should be approximately equal.

To speed up the rolling by a factor of 60, comment the line:
if (frameNumber < 60) return;
in the draw() function.