-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcallBack.js
More file actions
27 lines (25 loc) · 718 Bytes
/
callBack.js
File metadata and controls
27 lines (25 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function dinner() {
console.log("start cooking steak");
console.log("start washing vegetable");
setTimeout(() => console.log("washing done"), 500);
setTimeout(
() => {
console.log("steak done");
console.log("start cooking vegetable");
setTimeout(
() => {
console.log("vegetable done");
console.log("start enjoying dinner");
setTimeout(
() => console.log("I am full. (¯√¯)"),
10000
);
},
1000
)
},
2000
);
};
dinner();
// But how about racing?