© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Himanshu Kumar
Software Developer
Great article. I have stuck in this problem before. I wonder if there's a way to solve this by using async-await instead of promises.
Yogesh Chavan
Full Stack Developer | Freelancer | JavaScript | React | Nodejs. https://yogeshchavan.dev/. Book 1:1 @ hiretheauthor.com/myogeshchavan97
Himanshu Kumar If you're using async/await, you don't need to worry about this problem because when using await keyword, the next line will not be executed until the promise we're awaiting for gets resolved/rejected.
Yogesh Chavan That makes sense. Thanks for clarifying.