What did the new operator specific

1. Create an empty object, and this variable refers to the object, but also inherited the function prototype

2, properties and methods are added to the object referenced by this

3, the newly created object referenced by this, and finally return to this implicit

Guess you like

Origin www.cnblogs.com/rabbitstudent/p/11882195.html