title: Call function with multiple arguments based on conditional statement
body: <p>Title says it all I have the following function :</p>
  
  <pre><code>var foo = function(arg1, arg2,arg3) {
      // code
  }
  </code></pre>
  
  <p>I want to do something like :</p>
  
  <pre><code>foo('bar', (x == true ? arg2, arg3 : arg2,arg3))
  </code></pre>
  
  <p>But I get hit with <code>SyntaxError: Unexpected token ,</code> what is the right syntax to do something like this?</p>