Generate random number between two numbers in JavaScript

Is there a way to generate a random number in a specified range with JavaScript ?

For example: a specified range from 1 to 6 where the random number could be either 1, 2, 3, 4, 5, or 6.

3
32

Leave a Comment