ecma262
ecma262 copied to clipboard
Object() constructor does not always construct new ordinary object
trafficstars
20.1.1 The Object Constructor:
- creates a new ordinary object when called as a constructor.
- performs a type conversion when called as a function rather than as a constructor.
However, it only "creates a new ordinary object" when new.target !== Object. new Object(v) is exactly equivalent to Object(v) and "performs a type conversion". Not sure how this can be rephrased, though.