Skip to content

Instantly share code, notes, and snippets.

@konfou
Forked from vielhuber/script.js
Last active October 25, 2017 11:27
Show Gist options
  • Save konfou/3dfa46afb0b4456cf56780f2ae4c75c5 to your computer and use it in GitHub Desktop.
Save konfou/3dfa46afb0b4456cf56780f2ae4c75c5 to your computer and use it in GitHub Desktop.
replace all occurences in a string without regex #js
'this is a foo and a foobar'.split('foo').join('bar');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment