What is the simplest way to get 50 random unique elements from an array of 1000 elements ?
text = new Array(); for(i=0;i<1000;i++){ text[i]=i; } //array
Look into the Fisher-Yates algorithm, I think this will work for you.