array map with index in typescript code example Example: map index array.map((currentelement, index) => { });