We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bae591 commit bfd35ddCopy full SHA for bfd35dd
1 file changed
code/solutions/17_2_waiting_for_multiple_promises.js
@@ -1,5 +1,5 @@
1
function all(promises) {
2
- return new Promise(function(success, fail) {
+ return new Promise(function(succeed, fail) {
3
var results = [], pending = promises.length;
4
promises.forEach(function(promise, i) {
5
promise.then(function(result) {
@@ -17,7 +17,7 @@ function all(promises) {
17
}
18
19
// Test code.
20
-all([], function(array) {
+all([]).then(function(array) {
21
console.log("This should be []:", array);
22
});
23
function soon(val) {
0 commit comments