Open this example in the interactive library
Source code
console.log([...["a", "b"].entries()]);
Sample output
[ [ 0, 'a' ], [ 1, 'b' ] ]

Iterate indexed entries. A self-contained example using the JavaScript runtime.
Open this example in the interactive library
console.log([...["a", "b"].entries()]);
[ [ 0, 'a' ], [ 1, 'b' ] ]