So as my question is how to call random number, but only 10 times (when we got numbers from 0 to 9) with different numbers. here is code for generate random number:
Math.floor(Math.random() * 10);
but that code for example can get number 2, two times.
example output: 4, 3, 2, 9, 4, 3, 6, 3;
How to get output like that: 5, 3, 6, 4, 1, 9, 8, 2;
Here is a function:fiddle: but, numbers are random and can repeat and going over and over.
So how to replace number when number already exist, and stop variable from calling when all numbers was used?!