Answer the question
In order to leave comments, you need to log in
How to understand the inner workings of Promises in Javascript?
Reviewed a lot of materials on JS Promise, incl. questions from here
Answer the question
In order to leave comments, you need to log in
In the old days, when promises were not supported by browsers, there was their implementation on Bluebird JS
In addition to the V8 sources, you can look at https://github.com/petkaantonov/bluebird/
Well, for the "outdoor" device https://habr.com/ ru/company/mailru/blog/269465/
A long time ago, when there was no Promise in javascript yet, I studied the sources of several alternatives available at that time and I can say that it is not so easy for someone who has just recently become acquainted with the concept of asynchrony bet to understand the many constructs necessary for clean code. Links to the best implementations at the moment have already been given to you, but if you want something very simple with comments, then a variant written in haste can be useful.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question