-6

this is the result when I run in node

enter image description here

this is the result when I run in chrome

enter image description here

Rahul Singh Chandrabhan
  • 2,531
  • 5
  • 22
  • 33
Nomad
  • 1

2 Answers2

0

Nothing "weird" in Chrome, the a: "" reflect the actual value of the object which is indeed "" (not the one by the time you logged it).

If you put your mouse on the "i" it will say : "value below was evaluated just now)

Benoit B.
  • 65
  • 8
0

There is no issue at all in the output.

While the value is printed, value of "form.a" is 123. However the value of a is updated to "" in the code. Hence the behavior.

PrabhakarP
  • 187
  • 5