Loading
A collection of key-value pairs where the key can be anything — not just a string.
A built-in key-value store with any-type keys, guaranteed insertion order, and a .size property. Methods: set, get, has, delete, clear. Preferred over plain objects when keys are dynamic, non-string, or when frequent addition/deletion is needed.
Implemented as a hash table with O(1) average-case get/set. Keys are compared with SameValueZero. Iterates in insertion order (spec-guaranteed since ES2015). Weak variant (WeakMap) allows garbage collection of key objects.