Javascript String splice(index, remove, string)

Description

Javascript String splice(index, remove, string)

String.prototype.splice = function(index, remove, string) {
  return this.slice(0, index) + string + this.slice(index + Math.abs(remove));
};



PreviousNext

Related