Hey guys!
As always, super thankful for all the work you put into these tools, they’re amazing.
I’m just trying to wrap my head around async/await, which I wanted to try out in a project I’m working on.
The code is simply this:
async function fetchInvoiceData(postID) {
console.log(postID);
let promise = new Promise((resolve) => {
setTimeout(() => resolve("done!"), 1000)
});
let result = await promise; // wait till the promise resolves (*)
alert(result); // "done!"
}
Upon googling it seems like it might be a config issue, but I’m not entirely sure where to start digging. Anyone that could give me a heads up?