Skip to content

Instantly share code, notes, and snippets.

@ozantunca
Last active September 6, 2020 10:12
Show Gist options
  • 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