Skip to content

Commit b26a245

Browse files
Fixed typo / clarified comment for Promise.race
p2 presumably refers to task2 (promise2?), but task1 (p1 / promise1) actually will finish faster.
1 parent 9d69434 commit b26a245

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/promise.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ var task2 = new Promise(function(resolve, reject) {
450450

451451
Promise.race([task1, task2]).then(function(value) {
452452
console.log(value); // "one"
453-
// Both resolve, but p2 is faster
453+
// Both resolve, but task1 resolves faster
454454
});
455455
```
456456

0 commit comments

Comments
 (0)