How can I automatically replace all instances of multiple spaces, with onea single space, in Javascript?
I've tried with just chaining some s.replaces.replace but this doesn't seem optimal.
I'm using jQuery as well, in case it's a builtin functionality.