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*

3
  • 1
    It's a really good idea to avoid mixing await and .then() chains. Commented Jun 23, 2024 at 15:51
  • This doesn't really have anything to do with async/await. You'd get the same behaviour if you had used newPromise.then(…) instead of await newPromise. Commented Jun 23, 2024 at 17:47
  • "expected Output" - can you explain why exactly you expected that? There is nothing in your code that defines one to happen after the other. Commented Jun 24, 2024 at 10:28