Keep in mind, when using JS objects to construct Immutable Maps, that
JavaScript Object properties are always strings, even if written in a
quote-less shorthand, while Immutable Maps accept keys of any type.
Property access for JavaScript Objects first converts the key to a string,
but since Immutable Map keys can be of any type the argument to get() is
not altered.
Creates a new Immutable Map.
Created with the same key value pairs as the provided Collection.Keyed or JavaScript Object or expects a Collection of [K, V] tuple entries.
Note:
Map
is a factory function and not a class, and does not use thenew
keyword during construction.Keep in mind, when using JS objects to construct Immutable Maps, that JavaScript Object properties are always strings, even if written in a quote-less shorthand, while Immutable Maps accept keys of any type.
Property access for JavaScript Objects first converts the key to a string, but since Immutable Map keys can be of any type the argument to
get()
is not altered.