Answers for "javascript - get a random number"

12

javascript random number between 0 and 10

Math.floor(Math.random() * 10);
Posted by: Guest on November-24-2019
4

javascript random

function random(min, max) {
  return ~~(Math.random() * (max - min + 1) + min);
}
random(1, 5);
Posted by: Guest on June-08-2020

Code answers related to "javascript - get a random number"

Code answers related to "Javascript"

Browse Popular Code Answers by Language