generate specific random numbers JS code example
Example 1: random in a range js
const rnd = (min,max) => { return Math.floor(Math.random() * (max - min + 1) + min) };
Example 2: js random int
let int = Math.floor(Math.random() * 10);
const rnd = (min,max) => { return Math.floor(Math.random() * (max - min + 1) + min) };
let int = Math.floor(Math.random() * 10);