This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyPromise { | |
| constructor(executor) { | |
| this.fulfilledHandlers = []; | |
| this.rejectedHandlers = []; | |
| this.state = "pending"; | |
| this.value = undefined; | |
| const resolve = (value) => { | |
| if (this.state !== "pending") return; | |
| // self-resolution check |
A comprehensive guide to frontend system design interviews using the RADIO framework: Requirements, Architecture, Data Model, Interface Definition, Optimizations
NewerOlder