Skip to content

AhmedTarekHasan/JavaScriptPromiseTimeout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

How to Set Timeout for a JavaScript Promise

Just don’t wait forever for a Promise to get fulfilled, you need to set your own terms.


Did you ever wonder why couldn’t you set a timeout for your JavaScript Promise? You are not alone.


I had the same question before and actually, I couldn’t find an answer for the why. But I eventually decided to stop wondering and start acting.


Implementing a timeout for a JavaScript Promise is not that hard, you can easily do it yourself.


If you are interested into reading more about this topic, you can read the rest of the article.


If you want to support me:

▶ Subscribe to Medium using my referral link
▶ Subscribe to Medium Newsletter
▶ Subscribe to LinkedIn Newsletter
▶ Follow me on Medium
▶ Follow me on Twitter
▶ Follow me on LinkedIn


Authors: