1
0
mirror of https://github.com/onkelbeh/cheatsheets.git synced 2026-08-15 13:34:53 +02:00
This commit is contained in:
Rico Sta. Cruz
2015-04-18 03:35:46 +08:00
parent 981819454a
commit 99660143ab
4 changed files with 17 additions and 9 deletions

View File

@@ -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