Created
January 1, 2021 12:54
-
-
Save shahab570/1036558477f47f6d60d50a39914f0dcd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let check_files = function () { | |
return new Promise((resolve, reject) => { | |
resolve("I checked files, "); | |
}); | |
}; | |
let make_calls = function (message) { | |
return new Promise((resolve, reject) => { | |
resolve(message + "," + "I made all important calls"); | |
}); | |
}; | |
let paticipate_meeting = function (message) { | |
return new Promise((resolve, reject) => { | |
resolve(message + "," + "I participated in the meeting"); | |
}); | |
}; | |
let go_home = function (message) { | |
return new Promise((resolve, reject) => { | |
resolve(message + "," + " Now I am going home. "); | |
}); | |
}; | |
check_files() | |
.then((value) => { | |
return make_calls(value); | |
}) | |
.then((value) => { | |
return paticipate_meeting(value); | |
}) | |
.then((value) => { | |
return go_home(value); | |
}) | |
.then((value) => { | |
console.log(value + "At last am going to sleep"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment