Answers for "how to randem number in js"

5

generate random int js

function getRandomInt(min, max) {
    min = Math.ceil(min);
    max = Math.floor(max);
    return Math.floor(Math.random() * (max - min + 1)) + min;
}
Posted by: Guest on September-18-2020
1

random function in javascript

function getRandom() {
  return Math.random();
}
Posted by: Guest on June-09-2021

Code answers related to "how to randem number in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language