Skip to content

Commit 5f91fda

Browse files
committed
closes #3230
1 parent 508ca01 commit 5f91fda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

1-js/11-async/06-promisify/article.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function loadScript(src, callback) {
2525

2626
The function loads a script with the given `src`, and then calls `callback(err)` in case of an error, or `callback(null, script)` in case of successful loading. That's a widespread agreement for using callbacks, we saw it before.
2727

28-
Let's promisify it.
28+
Let's promisify it.
2929

3030
We'll make a new function `loadScriptPromise(src)`, that does the same (loads the script), but returns a promise instead of using callbacks.
3131

@@ -124,7 +124,7 @@ For more exotic callback formats, like those without `err` at all: `callback(res
124124
There are also modules with a bit more flexible promisification functions, e.g. [es6-promisify](https://github.com/digitaldesignlabs/es6-promisify). In Node.js, there's a built-in `util.promisify` function for that.
125125
126126
```smart
127-
Promisification is a great approach, especially when you use `async/await` (see the next chapter), but not a total replacement for callbacks.
127+
Promisification is a great approach, especially when you use `async/await` (covered later in the chapter <info:async-await>), but not a total replacement for callbacks.
128128

129129
Remember, a promise may have only one result, but a callback may technically be called many times.
130130

0 commit comments

Comments
 (0)