Possible Duplicate:
Generate 8 unique random numbers between 1 and 100
Generate unique number within range (0 – X), keeping a history to prevent duplicates
I need loop that will run 80 times and generate random number between 0-79 but it will not repeat number that has been generated already.
How can I do that?
// You have array ar with numbers 0 to 79 randomized. Verify
console.log(ar);// take out elements like this
ar.pop()