Javascript does not execute code right after an awaited call immediately (it does other stuff in between) after the async function returned
I'll begin by showing what should be the expected output, both from a sensible view point and because it's what happens if the functions weren't async. about to resolve about to return from foo code right after awaited return from…