Nodejs Utililty Methods Array Delete by Value

List of utility methods to do Array Delete by Value

Description

The list of methods to do Array Delete by Value are organized into topic(s).

Method

del(val)
Array.prototype.del = function(val){
    var index = this.indexOf(val);
    if(index > -1)
        this.splice(index, 1);
delRepeat()
Array.prototype.delRepeat = function () {
        var temp = {}, len = this.length;
        for (var i = 0; i < len; i++) {
            var tmp = this[i];
            if (!temp.hasOwnProperty(tmp)) {
                temp[this[i]] = "yes";
        var y = 0,result = [];
...
delete(element)
Array.prototype.delete = function(element)
     for (i=0;i<this.length;i++)
         if(this[i]==element)
             this.splice(i,1);
delete(item)
Array.prototype.delete = function(item) {
  var index = -1;
  for (var i = 0; i < this.length; i++) {
    if (item === this[i]) {
      index = i;
      break;
  if (index != -1) {
...
delete(value)
Array.prototype.delete = function(value){
  return(this.filter(function(n){ return n != value; }));
};
deleteByValue(val)
Array.prototype.deleteByValue=function(val){
    for (var i in this){
        if(this[i]===val){
            this.splice(i,1)
            break
deleteByValue(value)
Array.prototype.deleteByValue = function(value) {
    var pos = this.indexOf(value);
    this.splice(pos, 1);
delete_value(v)
Array.prototype.delete_value = function (v) {
    for (var i = 0; i < this.length; ++i) {
        if (this[i] = v) {
            this.slice(i, 1);
            return true;
    return false;