Good morning. array is a reserved word in jquery?
var indices= [];
var generarAleatorios = function(array){
if(indices.length<array.length){
while(indices.length<array.length){
var numAleatorio = Math.floor(Math.random()*array.length);
//verificar que el numero aleatorio no haya salido
if(indices.indexOf(numAleatorio)==-1){
indices.push(numAleatorio);
console.log(indices);
return numAleatorio;
}
}
}else{
alert("no hay mas fotos, ganastes el juego");
}
}
I HAVE THIS CODE AND I DO NOT UNDERSTAND EXACTLY. THANK YOU FOR YOUR HELP