The implementation process of new:

1. Create an empty object,let obj = {}, create a new object, that is, create a new object in the stack obj, this obj actually refers to a corresponding address in the heap; The __proto__ attribute points to the prototype object of the constructor objectFactory (obj).protoPrototype 3: call() / / call() / / call() / / call() / / call() / / call(); 4: Save the address of the object initialized in step 3 to the new object, and determine the return value type of the constructor objectFactory. If the constructor returns a value of this or primitive data type, then the new instance object is returned. If the constructor returns a value of reference type, then the value is the reference type.