Answers for "random number with node js"

5

generate random number nodejs

function getRandomNumberBetween(min,max){
    return Math.floor(Math.random()*(max-min+1)+min);
}
Posted by: Guest on December-31-2019
0

random integer in nodejs

//in npm, type npm install random-int

import randomInteger from 'random-int';

randomInteger(5);
//=> 3

randomInteger(10, 100);
//=> 54
Posted by: Guest on June-16-2021

Code answers related to "random number with node js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language