mirror of
https://github.com/onkelbeh/cheatsheets.git
synced 2026-08-15 13:34:53 +02:00
Update
This commit is contained in:
@@ -49,7 +49,7 @@ Promise.join(
|
||||
Use `.all`, `.any`, `.race`, or `.some`.
|
||||
|
||||
```js
|
||||
Promise.all([ pro1, pro2 ])
|
||||
Promise.all([ promise1, promise2 ])
|
||||
.then(function (results) {
|
||||
results[0]
|
||||
results[1]
|
||||
@@ -57,7 +57,8 @@ Promise.all([ pro1, pro2 ])
|
||||
|
||||
// succeeds if one succeeds first
|
||||
Promise.any(promises)
|
||||
.then(...)
|
||||
.then(function (result) {
|
||||
})
|
||||
```
|
||||
|
||||
### Object
|
||||
|
||||
Reference in New Issue
Block a user