Console.log(a) will always run and finish before your async function finishes in the example that you want.