Async / await
Derw handles this through the use of
do..return, blocks which can exist within functions, similarly to
let..inblocks. The main difference is that
do..returnblocks can have top level function calls (i.e without needing to assign the result to a const or a function). Each function call within a do..return block waits until has finished executing before continuing. This means that the order of definitions matter.
Under the hood, these are compiled to async/await JS blocks.