Skip to content

Instantly share code, notes, and snippets.

@konfou konfou/script.js forked from vielhuber/script.js
Last active Oct 25, 2017

Embed
What would you like to do?
replace all occurences in a string without regex #js
String.prototype.replaceAll = function(foo, bar) {
return this.split(foo).join(bar);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.