diff --git a/index.js b/index.js new file mode 100644 index 0000000..3561e9e --- /dev/null +++ b/index.js @@ -0,0 +1,25 @@ +const cleanRoom = () => { + return new Promise((res) => { + res('Cleaned the room'); + }); +} + +const removeGarbage = (mes) => { + return new Promise((res) => { + res(`${mes} Removed garbage`); + }); +} + +const winIcecream = (msg) => { + return new Promise((res) => { + res(`${msg} Won Icecream`); + }); +} + +cleanRoom().then((res) => { + removeGarbage(res).then((res) => { + winIcecream(res).then((resP) => { + console.log(`abcdefg ${resP}`); + }); + }); +}) \ No newline at end of file