Does it mutate 😱

Array.prototype.keys()

No mutation

Description

The keys() method returns a new Array Iterator that contains the keys for each index in the array.

arr.keys()

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys

Example

var array1 = ['a', 'b', 'c'];
var iterator = array1.keys(); 
  
for (let key of iterator) {
  console.log(key); // expected output: 0 1 2
}