Commit b23da6a8 authored by William Paul Liggett's avatar William Paul Liggett

Adding the constant of EVENTS_PER_MINUTE to make things more professional.

parent baea7b3a
......@@ -18,7 +18,10 @@
});
// 50 ms display duration for the letter to appear and then disappear on the screen.
const DISPLAY_LETTER_DURATION = 50;
const DISPLAY_LETTER_DURATION = 50;
// 57.5 events per minute. An event is a random letter change.
const EVENTS_PER_MINUTE = (57.5/60) * 1000;
// Function by Mozilla Contributors, Feb 2018
// Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
......@@ -100,7 +103,7 @@
}, DISPLAY_LETTER_DURATION);
}
// 57.5 events per minute. An event is a random letter change.
setInterval(changeRandomLetter, (57.5/60)*1000);
// An event is a random letter change set to the rate of EVENTS_PER_MINUTE.
setInterval(changeRandomLetter, EVENTS_PER_MINUTE);
})(window, jQuery);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment