array.map get index of element in array js code example Example: map index array.map((currentelement, index) => { });