let arr = [1,2,3,4,5,6,7]; for (let [index, leaflet] of arr.entries()){ console.log(index,leaflet) }