Skip to content

Instantly share code, notes, and snippets.

@vielhuber
Created October 25, 2017 11:08
Show Gist options
  • Save vielhuber/8539fadab97ddc75455c3ac726b744b0 to your computer and use it in GitHub Desktop.
Save vielhuber/8539fadab97ddc75455c3ac726b744b0 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