on-internet
← Community

How to remove internal space characters from a string?

Stack Overflow ·

var str = 'abc 123 hello xyz'; How to turn the above string to abc123helloxyz? I tried to trim but it left spaces still between characters. I can't use split(' ') too as the space is not one some time.

Comments

Sign in or sign up to comment and upvote.

No comments yet.