title: How do these extra parameters work with map()?
body: <p>I'm working on better understanding functional programming in javascript, but I'm a bit confused by what I've seen fed to map functions. Take the example below:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const f = x =&gt; (a, b, c) =&gt; b + a;
  
  const arr = [1, 2, 3, 4, 5, 6];
  
  const m = arr.map(f(1));
  
  document.write(m);</code></pre>
  </div>
  </div>
  </p>
  
  <p>When f returns a it will print each value, as expected. If it returns b it seems to return the index, and c will return the entire array for each value. Is there a reason to why this function works this way?</p>