-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.js
More file actions
51 lines (41 loc) · 1.29 KB
/
demo.js
File metadata and controls
51 lines (41 loc) · 1.29 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// function boilWater() {
// setTimeout( function boil() {
// console.log("Boiling water...")
// }, 200);
// Promise.resolve().then(
// setTimeout( function prepareCoffee() {
// console.log("Coffee Powder brought to kitchen water...")
// },100));
// Promise.resolve().then(function resolveBugs() {
// console.log("Thinking about resolving bugs in our program...")
// }
// );
// }
// function mixandPourOut() {
// console.log("everything done")
// }
// boilWater();
// mixandPourOut();
function boilWater() {
setTimeout( function boil() {
console.log("Boiling water...")
}, 20);
Promise.resolve().then(
setTimeout( function prepareCoffee() {
console.log("Coffee Powder brought to kitchen water...")
},100));
Promise.resolve().then(function thinkNothing() {
console.log("Thinking about doing nothingabout bugs in our program...")
})
Promise.resolve().then(function giveUp() {
console.log("Thinking about giving programming...")
})
Promise.resolve().then(function resolveBugs() {
console.log("Thinking about resolving bugs in our program...")
})
}
function mixandPourOut() {
console.log("everything done")
}
boilWater();
mixandPourOut();