Answers for "math.random in js MDN"

4

javascript get random floating number

const randomFloat = (min, max) => Math.random() * (max - min) + min;
Posted by: Guest on July-03-2020
7

random js

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

Code answers related to "Javascript"

Browse Popular Code Answers by Language