How do I wait for a promise to finish before returning the variable of a function?
I’m still struggling with promises, but making some progress thanks to the community here. I have a simple JS function which queries a Parse database. It’s supposed to return the array of results, but obviously due to the asynchronous nature of the query (hence the promises), the function returns before the results, leaving me with … Read more