nombre random js

JavaScript
function randomNumber(min, max) {
  return Math.floor(Math.random() * (max - min)) + min + 1;
}// On renvoie un nombre aléatoire entre une valeur min (incluse) 
// et une valeur max (exclue)
function getRandomArbitrary(min, max) {
  return Math.random() * (max - min) + min;
}
Source

Also in JavaScript: