The Object
creates an object wrapper for the given value.
- If the value is
null
orundefined
, it will create and return an empty object. - Otherwise, it will return an object of a Type that corresponds to the given value.
- If the value is an object already, it will return the value.
When called in a non-constructor context, Object
behaves identically to new Object()
.