Skip to content

Glossary: Algorithms Beyond the Basics in JavaScript

SameValueZero

The rule that `Map` and `Set` use to compare keys: it works like `===`, except `NaN` equals itself, and objects and arrays match only if they are the very same object. This is why an array key like `[15, 16]` can't be found again with a new array.

Where the book teaches it

Related terms

NaNMapSet