Creating an object with the new keyword in javascript will be done in several steps

when new.

Do four things when new:

① Create a new object

② Let this point to the newly generated object

③Execute this function

④ This newly created object will be returned.

Guess you like

Origin blog.csdn.net/L_Z_jay/article/details/111500484