0% found this document useful (0 votes)
2 views1 page

Js Promises

The document lists popular interview questions related to JavaScript promises, covering topics such as the differences between callbacks and promises, promise methods like Promise.all and Promise.race, and error handling in promise chains. It also addresses advanced concepts like implementing promises from scratch, throttling concurrent executions, and converting callback functions to promises. Additionally, it discusses the implications of unhandled rejections and the drawbacks of using Promise.all.

Uploaded by

rvignesh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Js Promises

The document lists popular interview questions related to JavaScript promises, covering topics such as the differences between callbacks and promises, promise methods like Promise.all and Promise.race, and error handling in promise chains. It also addresses advanced concepts like implementing promises from scratch, throttling concurrent executions, and converting callback functions to promises. Additionally, it discusses the implications of unhandled rejections and the drawbacks of using Promise.all.

Uploaded by

rvignesh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Most Popular JavaScript Promises Interview

Questions

1. Explain the difference between callbacks and promises.

2. What is the difference between [Link], [Link], [Link], and [Link]?

3. How do you chain promises and handle errors in a chain?

4. What are microtasks and macrotasks in the context of the event loop and promises?

5. How does async/await work under the hood compared to promises?

6. How do you implement a promise from scratch?

7. Explain promise chaining with an example.

8. What happens if you don’t handle a rejected promise?

9. How do you throttle or limit concurrent promise executions?

10. How do you convert a callback-based function to return a promise?

11. What’s the difference between returning a value vs returning a promise inside .then()?

12. How to retry a promise-returning function until it succeeds?

13. How do you cancel a running promise or async task?

14. What are the drawbacks of [Link] and how to avoid them?

15. How do you run promises sequentially instead of in parallel?

You might also like