-
Notifications
You must be signed in to change notification settings - Fork 4
/
dreamers.js
57 lines (34 loc) · 833 Bytes
/
dreamers.js
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
52
53
54
55
56
57
const yusufsDream = (arthursDream, saitosDream) => {
console.log("the dreamers: arthur and saito have entered yusuf's dream!")
const yusufKick = () => {
console.log('wake up Yusuf!')
}
setTimeout(() => {
arthursDream(saitosDream, yusufKick)
}, 1000)
}
const arthursDream = (saito, yusufKick) => {
console.log("saito has entered saito's dream")
const arthurKick = (kick) => {
console.log('wakeup arthur!')
yusufKick()
}
setTimeout(() => {
saitosDream(arthurKick)
}, 2000)
}
const saitosDream = (arthurKick) => {
const saitoKick = () => {
console.log('wakeup saito!')
arthurKick()
console.log('Inception!')
}
setTimeout(() => {
saitoKick()
}, 3000)
}
const yusufsDream = () => {
setTimeout(() => {
}, )
}
yusufsDream(arthursDream, saitosDream)