I am attaching an image where I can see that the entities property of object is an array with 100 elements. But when I expand it shows 201. And actually it is an array of length 201 only. I am not sure why this is happening. Any help is appreciated.
Asked
Active
Viewed 60 times
0
-
because `count` is the element stored in your object – Tushar Jul 15 '15 at 14:38
-
1because `console` is async, and on expand try show actual information – Grundy Jul 15 '15 at 14:39
-
Oh! that helps, I did not know it was async. Thanks – KingJames Jul 15 '15 at 14:47
1 Answers
0
When you console log for chrome what it outputs is what the object looks like as soon as it hits that piece of code. If you expand the object at a later time it could have changed.
var myObject = { test: 4, [{},{},{},{},{},{},{},{},{},{},{}] }
console.log(myObject);
myObject.test = 5;
Drop this into the chrome console and expand the object to see what I mean. It will show '4' when it's closed but '5' when it's opened.

Sinister Beard
- 3,570
- 12
- 59
- 95

Mathew Berg
- 28,625
- 11
- 69
- 90