How to remove internal space characters from a string?
21:24 26 Jul 2016
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.

javascript