Get code from Medium blog:
/ latest-data-fetcher-promise-javascript
In this video, we will talk about ensuring fetching the latest data while working with promises. This is a very common interview problem where you are asked to design a search bar that always shows the latest search. This becomes challenging as the order of API response is not guaranteed against the search data. In this video, we show how this problem can be solved using closures.