Skip to content

Instantly share code, notes, and snippets.

@Prosen-Ghosh
Created August 29, 2017 13:26
Show Gist options
  • Save Prosen-Ghosh/9812c725bd0de0b2c35440a1fbe7a2ac to your computer and use it in GitHub Desktop.
Save Prosen-Ghosh/9812c725bd0de0b2c35440a1fbe7a2ac to your computer and use it in GitHub Desktop.
Remove all exclamation marks from sentence but ensure a exclamation mark at the end of string
function remove(s){
return s.split('!').join('')+'!';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment