JavaScript constructor function internal principle

1, the front body constructor implicit plus this = {}

2, performs this.xxx = xxx;

3, the implicit return this

 

The first step may want to understand this, but actually more complicated than this.

Guess you like

Origin www.cnblogs.com/xiaonongfu/p/11009675.html