title: How do you add a key to a variable map in javascript?
body: <p>How would I add a key to a mapped variable statement like below?</p>
  <pre><code>  const limit = Math.max(...props.data.map(x =&gt; x.count), 0);
  </code></pre>
  <p>I'm getting an error in React stating &quot;Each child in a list should have a unique &quot;key&quot; prop.&quot; I know how to add a key to an HTML object, but I'm not sure how to do it in this case.</p>