diff --git a/Chapter 13/Exercise 13.2 b/Chapter 13/Exercise 13.2 new file mode 100644 index 0000000..7c0367a --- /dev/null +++ b/Chapter 13/Exercise 13.2 @@ -0,0 +1,13 @@ +const myPromise = new Promise((resolve, reject) => { + resolve("Start Counting"); +}); + +function counter(val){ + console.log(val); +} + +myPromise + .then(value => {counter(value); return "one"}) + .then(value => {counter(value); return "two"}) + .then(value => {counter(value); return "three"}) + .then(value => {counter(value);})