I have an array :
my Array = new Array ("0","1","2","3");
i want it to generate an index randomnly then it deletes that index so that next time it does not regenerate it. Here my code below, but it does not seems its deleting the index because it generates same index again.
var arr = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20");
var fill = new Array(20);
for(var i=0;i<20;i++){ fill[i]=0;}
for (i=0;i<y;i++){
randno = getRandom(0,20); //getRandom is function which generate random number
fill[randno]=1;
arr.splice(randno, 1);
}