I am working on the Twitch.tv project. I have successfully retrieved data from the api, and can display it as it arrives.
I am also pushing each stream object to myArr as it arrives, so I can sort and otherwise manipulate the data for later presentation. This appears to work. I can log the array to the console and see that it contains 9 stream objects, as expected.
However, when I try later to work on the array, I am getting unexpected results. Further testing reveals that myArr.length = 0. Huh? I don’t understand what is going on here.
Thanks for your help!