I feel like this should be an easy exercise:
1.- Generate 10 random numbers (0-99) and storage in an array.
2.- Numbers should not repeat.
But all the answer I get from the internet are very complicated or excessive long code.
In the code below I already generate the 10 numbers, but they keep repeating. Any ideas?? (i tried If/else but it didn't work) :(
numbers=[]
for(i=0;i<10;i++){
var oneRandomNum = Math.floor(Math.random()*100);
numbers.push(oneRandomNum);
}
console.log(numbers);
Thank you so much!!!!! :)