Exercise 13.2

This commit is contained in:
Karan 2021-11-24 22:13:28 +05:30 committed by GitHub
parent 005f3338f8
commit 1ebd51c38c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

13
Chapter 13/Exercise 13.2 Normal file
View File

@ -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);})