Closed mizanxali closed 2 years ago
I had the same issue as you earlier, in this instance your line of code "console.log(songs)" is executing before everything else hence why it turns out to be empty. Sadly I do not think there is a way to log it outside of the getChart function, so you might need to run all your code in there
Closing as this is not an issue with billboard-top-100
.
Hi! I have been using this API for a personal project and I'm kinda stuck in this situation. Consider the following case
An empty array is logged upon executing this piece of code. So, basically, how do I wait for the callback to mutate the array before it is logged to the console? Any help would be greatly appreciated!