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