JavaScript Newline Character
<p>From <a href="http://stackoverflow.com/questions/1155678/javascript-string-newline-character">this question</a>, this ...</p>

<pre><code>lines = foo.value.split(/\r\n|\r|\n/);
</code></pre>

<p>is one way to split a string, but how do I join it back with newlines? </p>

<p>Also, I wonder if I is say linux which uses whichever newline character, then switch to windows, won't my web app break? The newlines become not recognized? Or maybe the browser does some conversion? </p>
