Javascript Array without(other)

Description

Javascript Array without(other)


Array.prototype.without = function(other) {
 var result = [];
 for(var i = 0; i < this.length; i++)
  if(!other.has(this[i]))
   result.push(this[i]);/*from w  ww  .j  ava 2s.  c o  m*/
 return result;
};



PreviousNext

Related