Answers for "randome funciton in js"

4

nombre random js

// 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;
}
Posted by: Guest on March-30-2020
1

random int javascript

//Returns random Int between 0 and 2 (included)
Math.floor(Math.random()*3)
Posted by: Guest on July-04-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language