Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 8
    The question specifically asked about using async/await. Not using promises Commented Jan 28, 2018 at 22:12
  • This answer was not meant to be the definitive correct answer. This was a support answer to the other answers given above. I would have put it down as a comment but given that I have code, the answer field is a better place. Commented Jan 30, 2018 at 4:07
  • Thanks for clarifying. Showing how to make an async function is definitely helpful. Updating the second code block to use await will be a lot more relevant and useful. Cheers Commented Feb 11, 2018 at 0:25
  • I've edited your response to have it updated. Let me know if I missed something Commented Feb 11, 2018 at 0:43
  • 1
    the async modifier on function foo is not doing anything here. Commented Oct 16, 2024 at 8:32