Javascript String insertAt(index, string)

Description

Javascript String insertAt(index, string)


String.prototype.insertAt = function (index, string) {
  return this.substr(0, index) + string + this.substr(index);
};



PreviousNext

Related