// function to resolve the promise has to be async async function waitForResult() { // using await keyword const result = await loadResults(); console.log(result); }