| Viewed 82 times

How I can remove Additional spaces from a sentence in JavaScript?


All words should be separated by one space, and there should be no spaces at the beginning or end of the sentence.