Consider the following program:
let obj = {
[2**24 - 2**20]: 0,
};
let obj2 = {
[2**24 - 2**20 + 1]: 0,
};
function isEmptyKey(thing) {
let keys = Reflect.ownKeys(thing);
if (keys.length !== 1) throw 'too many keys';
console.log(keys[0] === '');
}
isEmptyKey(obj);
isEmptyKey(obj2);
This prints false, true. In every other engine, and per the spec, it should be false, false. (No one ever hits the error path; that's just for illustration.)