Answers for "js 5 random number"

1

random int javascript

//Returns random Int between 0 and 2 (included)
Math.floor(Math.random()*3)
Posted by: Guest on July-04-2020
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"

Browse Popular Code Answers by Language