1

A console.log is printing the value of an object. This object has a data key. The value of the data key is an array which contains two objects.

Within the Chrome Developer Tools Console, I'm seeing some conflicting data regarding the length of the array value stored as the data key:

Any idea why the summary on line 1 reports that the data key is an Array with length of 1, however when the object details are expanded it clearly shows that the data value is an Array with length of 2?

enter image description here

  • The line _`{data: Array(1), cuisine: "AMERICAN", saveRecipe: f}`_ is a string that get logged when the `console.log` is called, it shows the state of the object at that moment. It won't get updated when the object is changed. But when you unfold the object using the arrow on the left, then the console fetches the object at its current state and show it content (more explanation in the dupe link). – ibrahim mahrir Apr 12 '18 at 22:28

0 Answers0