Posts tagged “JavaScript”
3 posts Subscribe by RSS
3 posts
JavaScript Object Key Order: Why Object.keys Puts Numeric Keys First
Why integer-like keys jump to the front in Object.keys, per ECMA-262's OrdinaryOwnPropertyKeys: the array index range, symbols, deleted and re-added keys, and JSON.stringify order.
Why JavaScript sort() Puts 100 Before 9: Default String Order and the Comparator Contract
[10, 9, 1, 100].sort() returns [1, 10, 100, 9]. The default string comparison, the comparator contract, in-place mutation, undefined and holes, and toSorted(), per ECMA-262.
Why NaN === NaN is false: how ===, Object.is and includes compare values in JavaScript
In JavaScript, NaN === NaN is false but [NaN].includes(NaN) is true. The ECMA-262 rules for how ===, Object.is, and includes, Map and Set treat NaN and -0, with code.
No posts match. Try another word.