The Document object or the SetTimeout function I understand are web API’s that are included in the JavaScript runtime, whereas an Array or Date object is built into the programming language itself. Where do promises fit?
Are they part of a browser API or are they are part of the JavaScript language that run in the JavaScript engine?
Promises are JavaScript objects. They're documented in the ECMAScript specification.
There's nothing browser-specific about promises, and they're implemented in Node.js, not just browsers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With