gerar nodejs de número aleatório
function getRandomNumberBetween(min,max){
return Math.floor(Math.random()*(max-min+1)+min);
}
Old-fashioned Oryx
function getRandomNumberBetween(min,max){
return Math.floor(Math.random()*(max-min+1)+min);
}
Math.floor(Math.random() * max)
//in npm, type npm install random-int
import randomInteger from 'random-int';
randomInteger(5);
//=> 3
randomInteger(10, 100);
//=> 54
const crypto = require('crypto');
const otp = crypto.randomInt(1000, 9999);
console.log(otp) //generate random 4 pin