Returns an immutable map of entries, as new Map builds it: keys iterate in first-seen
order, and a repeated key keeps its first position and first key object and takes its last
value. Keys are compared with SameValueZero (-0 is stored as 0, NaN is one key); null and
undefined are stored as keys and values. Every method that would change the map, its views or
its entries throws UnsupportedOperationError.
For many entries, use copyOfMap: spreading a large array into a call fails at the call
site.
Returns an immutable map of
entries, asnew Mapbuilds it: keys iterate in first-seen order, and a repeated key keeps its first position and first key object and takes its last value. Keys are compared with SameValueZero (-0is stored as0,NaNis one key);nullandundefinedare stored as keys and values. Every method that would change the map, its views or its entries throwsUnsupportedOperationError.For many entries, use copyOfMap: spreading a large array into a call fails at the call site.
Time: O(n) average for
nentries.