I am experiencing a weird behavior while logging an object to the console.
I have a js class "Attribute". That class has an attribute "value". I had some problems with my code, so i decided to log the content to the console.
The funny thing is, when i log the object of the Attribute class to the console,
console.log(myAttribute)
it shows me this:
{ value: NaN }
But when i log the attribute directly,
console.log(myAttribute.value)
It shows me the correct value
"asd23gq"
That happens on Chrome and on Firefox. I have no way of explaining the behavior. Has anyone experienced something similar?