I am using the following code which generates random number between 0 to Totalfriends, I would like to get the random numbers but they should not be repeated. Any idea how?<
yourarray) of numbers in range [1..totalfriends]for (from 0 to yourarray.length - 1) make a pop() from the array (or just get the n-th element) so you will get everytime a different numberDoing so you you will avoid to get duplicated numbers