In the world of asynchronous JavaScript, understanding how to handle timeouts and cancellations isn’t just about tools like method here.
We’re creating a dummy Promise which resolves in given time & racing it against actual API call so either we get the API response or promise rejects after timeout has been crossed.
I hope this code was helpful 😄!
Feel free to customise according to your need & do let me know how did you feel about it ❤️
SOCIAL SHARE CARD GENERATOR