mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-21 19:16:23 +00:00
1 KiB
1 KiB
date | id | title |
---|---|---|
2020-09-11 | 14e0ce4b-b4b1-46fe-946a-c519550682ac | JavaScript Promises |
Introduction
A Promise1 is an asynchronous action that may complete at some point and produce a value. It is able to notify anyone who is interested when its value is available.
let fifteen = Promise.resolve(15);
fifteen.then(value => console.log(`Got ${value}`))
Parallel
Errors
Producing & Consuming
Use Async functions instead of this.