-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path7-intro.js
69 lines (69 loc) · 4.26 KB
/
7-intro.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
58
59
60
61
62
63
64
65
66
67
68
69
/**
* Event Loop: Timers / Promises / Observables
*
* @eginwong
* https://github.com/eginwong
* Senior Developer with Hatch, 2022
*
* ```````````````````
* ````.....```` `````````````````````
* `./ossooossssso+/-..``` ``````````````````````
* `./sysyyhhhhhddddmdhhyo/-```` ````````````````````````
* `./syyyyyyhdhhddddddmddddds:.```````````````````````````
* `.+ssssyydddhddddddddmmmmmmmdy/-`````````````````````````
* ```:ososyyhhyyyhdddddddddddmmmmmdyy+-.``````````````````````
* `````````````````````-+ooooooshdhhddddhhhyysssyhyyyddhhyyo:```````````..........
* `:ossyssyyyyyyssyys+/:----://:::/oyhyhyso----::::////+++oooss
* ` ```````./osyyssyso++/////:..`````````````.:oyyhysyooshddddmmmmmmmmmmm
* ```........----:::+shy+:///:---.-..``````` ```````````-syhdyhyoosydddddddddddddd
* /////////////////+syy/-......```.```` ` ````````./shddddy+/ohhhhhhhhhhhhhh
* ------------...-oyyso:..``````````````````` ``````...:oyhdddho/+yyyyyyyyyyyyyy
* ............``.-oysss/..``````````````` `````....:osyhhhhs//syyyyyssssssss
* ```````````````.oyyys/..````````` ` ` ```````.../sssssys//osssssoooooooo
* ```````````````.oydy+-..``````````````````` `````````..:ooosyy::+oooooooooo+++
* ````````````````+hd+-..``````..---..``..:////:---..````...:osoyy/-+ooo++++++++++
* ````````````````/hy:...`.---:/+osso/.`./ooo+/-....-......../ssyy--/ooo++++++++++
* `.yy:..--------:/++++-..-////////:-----....-/osyo..:+o+++++++++++
* ````````````/oss/---/o+syy++:/+:.-+--:+:oys://:--oo//++oo/../o:++++++++++++
* ```````````````...+oo:.`.----::..`.h+/+y-``.--:-..````/:...-o+-:::s//+++++++++++
* ...............-o///+-`````.....``+o.``+o.``.....`````/...-:/:o+.`--++++++++++++
* :::::::::::::::::-::/-.`````.....:s` /:...........-/..-:/:.s/.``:++++++++++++
* ::::::::::::::::-.-:.--.------:::/.` .:::-----------:://:+s-``.+o+++++++++++
* :::::::::::::::::...---.......---` ````````.--......---:////+y:``./oo+++++++++++
* :::::::::::::::::-.`.---..`````..-//:-::/o/-.``.```..::////oy:``.:+o++++++++++++
* ::::::::::::::::::-..---..``````-oyyoooosys+-`````..--://:/o/::://++++++++++++++
* :::::::::::::::::::-::--..```````-----:-....``````...--:::o/:::///++++++++++++++
* :::::::::::::::::::::---..``````````````````````````..-::+o:::::/+++++++++++++++
* :::::::::::::::::::::::-..``````.--:::::/://:-..```..-://s:::::://++++++++++++++
* ::::::::::::::::::::::::-..```.-/++/:::::::::/:-...-:///o+:::::://++++++++++++++
* :::::::::::::::::::::::::::-..-:::////://+++/:---:-//+++s/:::::://++++++++++++++
* :::::::::::::::::::::::::://::---/+oosssoo++::-:-:/+oo+//o:::::://++++///////+//
* ::::::::::::::::---------:/++/:-----::::::---...-+ssoo/:-+:::::::///:::---::::::
* :::-----------------------:/+o+/:-://+++/:::--:+ossso+:--:+::::::/:::-----------
* ---------------------------:/+ooooo++::-:::/+ossssso/-....+:-:::////////////////
* ...................---------::/+ossssssooossyyyyso+/-......+-:/+osssssssssssssss
* .........................----:://+ossyyhhhhhysso+//-.......-/:/oyyhhhhyyyhhhhhhh
* -.............-----......-.----::///+oosssso++//::..```````..+osssssssssssssooss
* ----.--------------------.....----::://++///:::--.````````````:+ooooooooooo++++o
* ......................-.........-----:::::::::-.````````````````:/++++++o+++++++
* ...................-:o-``...........----------.`````````````` ``-:::///:::::::
* --..............--:+so:```.``................`````````````` `.-::::--:::::::::
* ------......---:///+s++/.``````...........``````````````` `.-::////:///::::::::
* ------------:::::::o+////:.`````````...`````````` `.-::///////////////:::::
* ------:::::::::::/:o+///////:-.` ` ``````` `..--:://////////////////////::
*
*
*
*
* # Audience
* - curious about js event loop
* - seen js timers but never fully grokked how they work and play together
*
* # Question
* - How can I understand the riddle?
* - How do timers/promises/rxjs/ticks work together?
*
* # Takeaway
* - Demystify the event loop timers
* - Provide tools to solve the riddle
*/