Categories
Generates a random number within a specified range.
Contributed by @itsbrunodev
function randomNumber(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }
randomNumber(1, 10); // 5