function which takes 3 argument
<p>I would like to have a function which takes 3 arguments:
sentence (string), 
maxCharLen=20 (number), 
separator (string)</p>

<p>Here is my example:
Should it be possible to improve this code?</p>

<pre><code>function breakSentence(sentence) {
   var newstring,
       maxCharLen = 20,
       separator = ',';
   for(var i=0; i &lt; sentence.length; i++) {
      newstring += sentence.charAt(i);
      if ((i % maxCharLen) === 0) {
         newstring += separator;
      }
   }
}
</code></pre>
