Array.prototype.keys()

Syntax

console.log(Array.from(['a', 'b'].keys())) // [0, 1]