How to extract data out of a Promise
NO you can’t get the data synchronously out of a promise like you suggest in your example. The data must be used within a callback function. Alternatively in functional programming style the promise data could be map()ed over. If your are OK using async/await (you should it’s awesome) then you can write code that looks … Read more