So basically i got this function
Math.random()
we were taught to use this formula in order to get values from 1 to x
parseInt(Math.random()*x)+1;
but now what i want to do is to get values from x to y but i'm not sure how to do it .. any help ?
const doRandom = (min,max) => {
return Math.floor(Math.random() * (max - min) + min);
}
console.log(doRandom(5,9));