Skip to content

Glossary: Data Structures and Algorithms in JavaScript

Hash key

Also written: SameValueZero, compound key

What a Map or Set hashes and compares. Strings, numbers and booleans match by value, while objects and arrays match only if they are the very same object, so compound keys are joined into one string like "Portland|mug".

Where the book teaches it

Related terms

Hash mapSet