Bạn sẽ có thể nhận được các lần lặp hiện tại indexcho mapphương thức thông qua tham số thứ 2 của nó.
Thí dụ:
const list = [ 'h', 'e', 'l', 'l', 'o'];
list.map((currElement, index) => {
  console.log("The current iteration is: " + index);
  console.log("The current element is: " + currElement);
  console.log("\n");
  return currElement; //equivalent to list[index]
});
Đầu ra:
The current iteration is: 0 <br>The current element is: h
The current iteration is: 1 <br>The current element is: e
The current iteration is: 2 <br>The current element is: l
The current iteration is: 3 <br>The current element is: l 
The current iteration is: 4 <br>The current element is: o
Xem thêm:  https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/map
  Thông số
  
  gọi lại - Hàm tạo ra một phần tử của Mảng mới, nhận ba đối số:
  
  1) currentValue 
        Phần tử hiện tại đang được xử lý trong mảng.
  
  2) index Chỉ 
      mục của phần tử hiện tại đang được xử lý trong mảng.
  
  3) mảng 
      Bản đồ mảng được gọi theo.