Skip to content

Instantly share code, notes, and snippets.

@shahab570
Created January 1, 2021 12:54
Show Gist options
  • Save shahab570/1036558477f47f6d60d50a39914f0dcd to your computer and use it in GitHub Desktop.
Save shahab570/1036558477f47f6d60d50a39914f0dcd to your computer and use it in GitHub Desktop.
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