How can I break up a javascript string with a new line every five words?
<p>I have an unusual request. Given a string like the following:</p>

<pre><code>var a = "This is a sentance that has many words. I would like to split this to a few lines"
</code></pre>

<p>I need to insert a "\n" every fifth word. The string a can have any number of alphanumeric characters. </p>

<p>Can someone give me an idea how I could do this?</p>
