Skip to content

Commit bfd35dd

Browse files
olslashmarijnh
authored andcommitted
Fix solution 17.2
1 parent 8bae591 commit bfd35dd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

code/solutions/17_2_waiting_for_multiple_promises.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function all(promises) {
2-
return new Promise(function(success, fail) {
2+
return new Promise(function(succeed, fail) {
33
var results = [], pending = promises.length;
44
promises.forEach(function(promise, i) {
55
promise.then(function(result) {
@@ -17,7 +17,7 @@ function all(promises) {
1717
}
1818

1919
// Test code.
20-
all([], function(array) {
20+
all([]).then(function(array) {
2121
console.log("This should be []:", array);
2222
});
2323
function soon(val) {

0 commit comments

Comments
 (0)