Why does Chrome display two differing datasets depending on if you have the object view expanded?
In contracted view, my object has two properties:
@Gideon Pyzer is right. the properties were caculated and added after expanding the object in the console.
Just add one line code above your debug code and reopen the chrome dev tool, you will see the differences.
obj = Object.freeze(obj); //add this line before your console.log
console.log(obj);
Before:
After:
one similar question of mine: Why can't I access the attr of the javascript object shown in chrome dev tool