String.prototype.replaceAll() replaces all occurrence of a string with another string value. Mathias bynens proposal solves these problems and gives a very easy way to do substring replacement. replaceAll in Javascript is easier to use than split and join. Suprabha Supi is an open-source, free-to-use JavaScript interpreter.