How do “Object()” and “new Object()” differ in JavaScript?
问题 In JavaScript, what's the difference between var x = Object(); and var x = new Object(); ? 回答1: This is pulled directly from the ECMAScript specification: 15.2.1 The Object Constructor Called as a Function When Object is called as a function rather than as a constructor, it performs a type conversion. 15.2.1.1 Object ( [ value ] ) When the Object function is called with no arguments or with one argument value, the following steps are taken: If value is null, undefined or not supplied, create