title: Call function with a specific default argument in JavaScript?
body: <p>So I have a function like so:</p>
  <pre><code>function foo(a, b, c=0, d=10, e=false) {
    // ...
  }
  </code></pre>
  <p>I would like to call this function with specific inputs, but not necessarily need to list them in order in the input. So like:</p>
  <pre><code>foo(&quot;bar&quot;, &quot;skurr&quot;, e=true);
  </code></pre>
  <p>I know in python you can call functions this way, but it seems there is another method I am unaware of for js.</p>
  <p>I have tried inputting an object but that did not work since it just uses the object as the first parameter of the function.</p>
  <pre><code>foo({a: &quot;bar&quot;, b: &quot;skurr&quot;, e: true});
  </code></pre>
  <p>How do I call functions in this manner in JavaScript?</p>