- Create a new object
- The new object is set as a function of this, in this constructor may be used to refer to the new object (the scope constructor assigns a new object)
- Progressive execution of the function code (the code for the constructor is executed, the new object is added to property)
- The new object is returned as the return value
var arr = new Array;
console.log(arr);
console.log(Array.prototype);
The following figure on the left is console.log(arr);
right is console.log(Array.prototype);
seen in this process is equivalent to:
var arr = {};
arr.__proto__ = Array.prototype;
Array.call(arr);