How can I replace newlines/line breaks with spaces in javascript?
<p>I have a var that contains a big list of words (millions) in this format: </p>

<pre><code>var words =  "
car
house
home
computer
go 
went
";
</code></pre>

<p>I want to make a function that will replace the ENTER between each word with space.
so the results would look like some like this:</p>

<pre><code>car house home computer go went
</code></pre>
