DEV Community

Discussion on: Await inside JavaScript template strings

Collapse
 
brancualexandru profile image
Brancu Alexandru • Edited

That is super interesting! I just found this out, while learning how to use async ... await in codeacademy!! Unfortunately their compiler doesn't let this work for some reason.

EDIT: I literally spelled a var name wrong, it works perfectly. But it's not accepting my solution as valid because reasons.
:/

Collapse
 
noseratio profile image
Andrew Nosenko

Not all online IDEs support top level await, but you can wrap it as an async function.