title: coffeescript throw Error("ExecJS::RuntimeError: SyntaxError: unexpected , in function
body: <p>I have written this function in coffeescript: </p>
  
  <pre><code>doCalculate = (old, new) -&gt;
    difference = roundNumber (old - new, 5)
  </code></pre>
  
  <p>but when compiled generates the error: </p>
  
  <pre><code>throw Error("ExecJS::RuntimeError: SyntaxError: unexpected ,
  </code></pre>
  
  <p>If I remove the <code>, 5</code> part I get no error any more. </p>
  
  <p>I can't figure what's wrong with a comma. </p>
  
  <p>The function <code>roundNumber</code> is defined as follows, in the same file: </p>
  
  <pre><code> roundNumber = (rnum, rlength = 6) -&gt;
     pow = Math.pow( 10, rlength )
     newnumber = Math.round ( rnum * pow ) / pow
     parseFloat(newnumber)
  </code></pre>