title: Javascript skip arguments in function call
body: <p>javascript beginner here.</p>
  
  <p>Let's say I'm having a javascript function that takes 3 arguments:</p>
  
  <pre><code>function f(arg1, arg2, arg3) { // do stuff }
  </code></pre>
  
  <p>I know that I can call f(value1, value2); and in that case inside the function scope arg1 will be value1, arg2 will be value2 and arg3 will be null. </p>
  
  <p>Everything ok with this. However if I want to call the function giving values only to <code>arg1</code> and <code>arg3</code> I need to do something like this: <code>f(value1, null, value2)</code>;</p>
  
  <p>Is there a way I can specify which arguments to have which values in a more C#-esque manner (without specifying not given arguments as null)? Something like this: for calling f with values only for <code>arg1</code> and <code>arg3</code> I would write <code>f(value1, arg3 = value2);</code></p>
  
  <p>Any ideas?
  Cheers!</p>