If I want 4 random number in an array [num1, num2, num3, num4], I can't do
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}
const arr = [getRandomFloat(1,10), getRandomFloat(1,10), getRandomFloat(1,10), getRandomFloat(1,10)]
because I'll have duplicated value. Is there any way or library that allow me to generate a unique set of randomed number?