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.