Skip to content

Commit 7d83a1a

Browse files
authored
Update article.md
1 parent 440f408 commit 7d83a1a

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
@@ -30,7 +30,7 @@ let loadScriptPromise = function(src) {
3030
return new Promise((resolve, reject) => {
3131
loadScript(src, (err, script) => {
3232
if (err) reject(err)
33-
elsee resolve(script);
33+
else resolve(script);
3434
});
3535
})
3636
}
@@ -75,7 +75,7 @@ loadScriptPromise(...).then(...);
7575

7676
Here we assume that the original function expects a callback with two arguments `(err, result)`. That's what we meet most often. Then our custom callbacks is exactly in the right format, and `promisify` works great for such case.
7777

78-
But what is the original `f` expects a callback with more arguments `callback(err, res1, res2)`?
78+
But what if the original `f` expects a callback with more arguments `callback(err, res1, res2)`?
7979

8080
Here's a modification of `promisify` that returns an array of multiple callback results:
8181

0 commit comments

Comments
 (0)