Hello I need disorder an array. I tryed something like this:
var letras = ['a', 'e', 'i', 'o', 'u'];
function disorder(p){
for(i=0;i<100;i++){
pos = Math.random()*p.length;
temp=p[pos];
p.splice(pos,1);
p.push(temp);
}
}
But it doesnt work, and I am not sure that was memory efficient because of the deletes.