Can anyone help me understand why the Array is showing as being empty, when it also shows that it has data/ values ?
I am not able to access the data. See picture for reference.
Can anyone help me understand why the Array is showing as being empty, when it also shows that it has data/ values ?
I am not able to access the data. See picture for reference.
Objects logged in the Javascript console are "live", so expanding them shows the current contents of the object. The first line shows that the outputList
was empty when you first called console.log()
. But something was added to the array later, and when you expanded the object by clicking on the disclosure triangle, you see the updated value.