Answers for "math.floor(math.random() * 100) for what"

0

math random 0 to 100

Math.floor(Math.random() * 101);
Posted by: Guest on March-14-2021
0

js Write a function that will return a random integer between 10 and 100

function randomIntFromInterval(min, max) { // min and max included 
  return Math.floor(Math.random() * (max - min + 1) + min)
}

const rndInt = randomIntFromInterval(1, 6)
console.log(rndInt)
 Run code snippetHide results
Posted by: Guest on December-05-2021

Code answers related to "math.floor(math.random() * 100) for what"

Browse Popular Code Answers by Language