Confusing JavaScript statement: “var x = new this();”

后端 未结 8 1044
野趣味
野趣味 2021-02-01 20:30

I thought I understood the concept of the JavaScript prototype object, as well as [[proto]] until I saw a few posts regarding class inheritance.

Firstly, \"JavaScript OO

8条回答
  •  礼貌的吻别
    2021-02-01 20:42

    see this link http://www.quirksmode.org/js/this.html It will tell you about the this keyword, but I am not sure what this() is, may be its some kind of user defined function...... that you are not aware of...

提交回复
热议问题