I have a string that looks like:
dog cat hello house apple fork bird
I want to change the string to look like:
dog cat hello house apple fork bird
How would I achieve this using JavaScript and/or jQuery?
I have a string that looks like:
dog cat hello house apple fork bird
I want to change the string to look like:
dog cat hello house apple fork bird
How would I achieve this using JavaScript and/or jQuery?
str = str.replace(/[\s]+/g, ' ');