Frage im Vorstellungsgespräch bei Microsoft

Write the Promise constructor function

Antwort im Vorstellungsgespräch

Anonym

17. Feb. 2021

need to think of cases such as "then" is called before the promise "resolve" was fired, and for multiple "then"/"catch" calls should use a stack array and fire them in sequence. Also should work if the "resolve" method fired before then "then" method was registered.