I'm trying to push some objects into an array.
This is done in a cursor loop in an 'onsuccess' function of a cursor search using indexedDB.
It uses continue() to iterate through the matching objects.
I'm pushing these onto an array with arrayname.push.
I am examining the finished array with a console.log(arrayname) outside this function and the array appears to contain 4 objects and yet has a length of zero. It also mentions a length of 4 and shows the object.
I have attached a picture which illustrates console.log(arrayname).
illustration on console.log(arrayname)
I'm not clear on what the log is telling me - where are those objects? The result I have is by clicking on the Array [ ] that appears in the console which is the logged result.
Thanks for any help in untangling this.
Moray