Answers for "random with interval"

66

random int from interval javascript

function getRandomNumberBetween(min,max){
    return Math.floor(Math.random()*(max-min+1)+min);
}

//usage example: getRandomNumberBetween(20,400);
Posted by: Guest on July-23-2019
0

counter random interval

// This will not stop so control it...

const random = setInterval(randomCounter);

function randomCounter() {
  setInterval(50);
  const t = new Date();
  const m = t.getMonth() + 1;
  const d = t.getDay();
  const y = t.getMilliseconds() * 10;
  const mins = t.getMinutes() * 5;
  console.log((y * mins) / 50);
}
Posted by: Guest on April-07-2022

Code answers related to "random with interval"

Code answers related to "Javascript"

Browse Popular Code Answers by Language