Below is some code I\'m having trouble with. Basically, I\'m defining an empty array as a global variable (var playlist = []) and then trying to add elements to it within a
.get is asynchronous, hence the need to provide a callback function. While your get is still in process you are trying to use the array, probably before it's actually been populated.