Asyn-Await

//I think your understanding of Promises and async/await is not correct.
//When you make a function async, the await keyword before a promise make sure
//that code execution will pause until the promise fulfilled or rejected. 
//Your code can be simplified:

var currentPromise;

async function asyncFunc(promise){
    // Do some code here
    return await promise;
}

function anotherFunction(){
    asyncFunc(currentPromise);
}
//When we are calling return await promise, the execution engine waits in a
//non-blocking way until the promise fulfilled or rejected, and then it returns 
//the output to the anotherFunction function.

Similiar Collections