Nodejs NodeList Remove remove()

Here you can find the source of remove()

Method Source Code

NodeList.prototype.remove = HTMLCollection.prototype.remove = function() {
  for(var i = 0, len = this.length; i < len; i++) {
    if(this[i] && this[i].parentElement) {
      this[i].parentElement.removeChild(this[i]);
    } /* w ww . ja  va 2  s. co  m*/
  }
}

Related

  1. removeHTMLCollection.prototype.remove = ()
    NodeList.prototype.remove = HTMLCollection.prototype.remove = function() {
        for(var i = this.length - 1; i >= 0; i--) {
            if(this[i] && this[i].parentElement) {
                this[i].parentElement.removeChild(this[i]);
    };