Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/02/2010, 12:22
Avatar de Fernand0
Fernand0
 
Fecha de Ingreso: septiembre-2005
Ubicación: Buenos Aires
Mensajes: 610
Antigüedad: 18 años, 7 meses
Puntos: 19
Respuesta: Replace no me funciona

Código Javascript:
Ver original
  1. var list=new Array(1, 2, 3, 4, 5);
  2. var unsec=new Array(2, 3);
  3.  
  4.  
  5. Array.prototype.inArray=function (Search)
  6. {
  7.     for(var i=0; i<this.length; ++i)
  8.         if(this[i]===Search) return true;
  9.     return false;
  10. };
  11. Array.prototype.remove=function (array)
  12. {
  13.     for(var i=0; i<this.length; ++i)
  14.         if(array.inArray(this[i]))
  15.         {
  16.             this.splice(i, 1);
  17.             --i;
  18.         }
  19.     return this;
  20. };
  21.  
  22.  
  23. alert(list.remove(unsec).join());

A ver si esto te sirve