Javascript Array exclude(e)

Description

Javascript Array exclude(e)

Array.prototype.exclude = function(e) {

  var rst = [];/*  w w  w.  j  a  v  a2s.  c  o  m*/
  for (var i = 0; i < this.length; ++i) {
    if (e != this[i])
      rst.push(this[i]);
  }

  return rst;

}



PreviousNext

Related