Does awaiting a non-Promise have any detectable effect?
await is not a no-op. If the awaited thing is not a promise, it is wrapped in a promise, that promise is awaited. Therefore await changes the execution order (but you should not rely on it nevertheless): console.log(1); (async function() { var x = await 5; // remove await to see 1,3,2 console.log(3); })(); console.log(2); … Read more