Posts tagged “JavaScript”
2 posts Subscribe by RSS
2 posts
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.