The JS print this object value is inconsistent with the property value of the print this object.

clipboard.png
:

this.pass false this pass true
clipboard.png

Mar.12,2021

the this you printed is a reference. When you view the this object printed on the console, the line of code this.pass = true has been executed, and the value in this reference has also changed. You want to view a snapshot of this, so you can only make a breakpoint in this.pass = true, and then hover over the mouse to see the value of this variable


console.log (JSON.stringify (this)) , What you see is a snapshot of when you unfold the object.

Menu