Returns an iterable of index, value pairs for every element in the array.
entries()
An interable of [index, value] pairs, where each pair is an array
where the 0 element is the index, 1 element is the value.
Array.from(["coffee", "tea", "juice"].entries())
[ [ 0, coffee ], [ 1, tea ], [ 2, juice ] ]
for (let [index, value] of ["coffee", "tea", "juice"].entries()) {
print(index, value)
}
0 coffee
1 tea
2 juice