Skip to content

Commit

Permalink
Review of console debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
atom-box committed Oct 30, 2021
1 parent 3f01ac6 commit 79ad954
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions asyncExample1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
let a = function(x) {
console.log(x + 'a');
return new Promise (function(resolve, tin){
x += " mercury";
resolve(x);
})
}

let b = function(x) {
console.log(x + 'b');
return new Promise (function(resolve, tin){
x += " venus";
resolve(x);
})
}
let c = function(x) {
console.log(x + 'c');
return new Promise (function(resolve, tin){
x += " earth";
resolve(x);
})
}
let d = function(x) {
console.log(x + 'd');
return new Promise (function(resolve, tin){
x += " mars";
resolve(x);
})
}


a('Stoughton ')
.then(b)
.then(c)
.then(d)
.then((x) => {console.log("big payoff is: "); console.log(x); })

0 comments on commit 79ad954

Please sign in to comment.