Created
June 28, 2016 06:08
-
-
Save avishwakarma/0086274cdd260aeb04440e98719d7957 to your computer and use it in GitHub Desktop.
remove all spaces (" ") from string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * remove all spaces (" ") from string | |
| * @uses removeSpaces("sample string with s p a c e s") // samplestringwithspaces | |
| */ | |
| function removeSpaces(str){ | |
| return (str + "").replace(/ /g,''); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment