Generate a random number in JavaScript

var minValue = 0;
var maxValue = 999;
Math.floor(Math.random() * (maxValue - minValue + 1)) + minValue;

Add your comment