Why do I get SyntaxError: Assigning to rvalue?
<p>I have a <code>map()</code> and I want to pass two parameters:</p>

<ol>
<li>a string</li>
<li>a function</li>
</ol>

<p>Example code:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>{
  values.map((workflow, totalWorkflow()) =&gt; {
    return &lt;WorkflowSingle key={ workflow } workflow={ workflow } /&gt;
  })
}</code></pre>
</div>
</div>
</p>

<p>Why do I get this error: <code>SyntaxError: Assigning to rvalue</code></p>