title: How to get sequence number in map function in JavaScript?
body: <p>Is there a way for me to get the sequence number of each item in a <code>map</code> function in JavaScript?</p>
  
  <p>For example, I have an array of 5 items and would like to pass the sequence number of each item to my React component in the following code:</p>
  
  <pre><code>{toDoList.map(item =&gt; &lt;ToDoItem key={item.id} sequenceNumber={???} data={item} /&gt;)}
  </code></pre>