Vue's question about console (this.xx)

   

as shown in figure

this and this.ws both output normally,
but the problem is that in the output of this , you don"t see ws ?
what is the reason for this? Why doesn"t this ws be shown? Where does he exist

contact with JS is not in depth, so I can"t understand the situation. I hope I can give you some advice

.
May.24,2022

js has its own member objects and properties inherited from the prototype chain. In this case, this.ws should be in prototype , that is, on the prototype chain, click prototype below to find it.

Menu