You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letobj={[2**24-2**20]: 0,};letobj2={[2**24-2**20+1]: 0,};functionisEmptyKey(thing){letkeys=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.)
The text was updated successfully, but these errors were encountered:
Note that there's an open question about the order of ownKeys for large integer keys (> 2**32 - 2), though it's not all that closely related to this issue (it's just how I came across it).
Consider the following program:
This prints
false, true
. In every other engine, and per the spec, it should befalse, false
. (No one ever hits the error path; that's just for illustration.)The text was updated successfully, but these errors were encountered: