Javascript String replaceAll(replacedText, replaceText)

Description

Javascript String replaceAll(replacedText, replaceText)


String.prototype.replaceAll = function(replacedText, replaceText){
  return this.replace(new RegExp(replacedText, 'gm'), replaceText)
}



PreviousNext

Related