Skip to content

Commit 1149d76

Browse files
committed
Merge pull request DrkSephy#5 from zwacky/hotfix/fulfill-typo
fix: fulfill typo
2 parents f7497cf + 4974e14 commit 1149d76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,11 +700,11 @@ Prior to ES6, we used [bluebird](https://github.com/petkaantonov/bluebird) or [Q
700700

701701
```javascript
702702
new Promise((resolve, reject) =>
703-
reject(new Error('Failed to fufill Promise')))
703+
reject(new Error('Failed to fulfill Promise')))
704704
.catch(reason => console.log(reason));
705705
```
706706

707-
Where we have two handlers, **resolve** (a function called when the Promise is **fufilled**) and **rejected** (a function called when the Promise is **rejected**).
707+
Where we have two handlers, **resolve** (a function called when the Promise is **fulfilled**) and **rejected** (a function called when the Promise is **rejected**).
708708

709709
> **Benefits of Promises**: Error Handling using a bunch of nested callbacks can get chaotic. Using Promises, we have a clear path to bubbling errors up and handling them appropriately. Moreover, the value of a Promise after it has been resolved/rejected is immutable - it will never change.
710710

0 commit comments

Comments
 (0)