// https://www.youtube.com/watch?v=JB_yU6Oe2eE 19:30์ ์ค๋ช
๋์ด
const getHen = () => new Promise(
(resolve, reject) => {
setTimeout(() => resolve('๐'), 1000);
}
);
const getEgg = hen => new Promise(
(resolve, reject) => {
setTimeout(() => resolve(`${hen} => ๐ฅ`), 1000);
}
);
const cook = egg => new Promise(
(resolve, reject) => {
setTimeout(() => resolve(`${egg} => ๐ณ`), 1000);
}
);
getHen()
.then(hen => getEgg(hen))
.then(egg => cook(egg))
.then(meal => console.log(meal));