Javascript String replaceAll(s1, s2)

Description

Javascript String replaceAll(s1, s2)


 
String.prototype.replaceAll = function(s1, s2) {
    return this.replace(new RegExp(s1, "gm"), s2)
}



PreviousNext

Related