Javascript String replaceAll(toReplace, replacement)

Description

Javascript String replaceAll(toReplace, replacement)


String.prototype.replaceAll = function (toReplace, replacement) {
    var result = this.split(toReplace).join(replacement);
    return result;
};



PreviousNext

Related