DEV Community

Discussion on: Asynchronous code with async/await

Collapse
 
robihood23 profile image
Robert Gogolan

Except the 3 first snippets, in the rest you forgot to declare the functions as async. As far as i know you cannot use await inside a function if it is not async.

I know that it was not intentional :D

Collapse
 
damcosset profile image
Damien Cosset

Damn, you're right. I edited the article. Thank you sir :)