Skip to content

Instantly share code, notes, and snippets.

@ozantunca
Last active September 6, 2020 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozantunca/8c02904ecebb2917419e64c21cce9c9c to your computer and use it in GitHub Desktop.
Save ozantunca/8c02904ecebb2917419e64c21cce9c9c to your computer and use it in GitHub Desktop.
function removeFromText(text, strToBeRemoved) {
return text.split(strToBeRemoved).join('');
}
removeFromText('lorem+ipsum+dolor+sit+amet', '+');
// -> 'loremipsumdolorsitamet' ✅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment