I’m glad you liked it and found it helpful!
In this case the “API box” refers to the timer module, which is part of Node.js — in other words a “global API”. When for example
setTimeout is called, a timer is scheduled (a
Timeout Object is created internally) and the event loop will run as long as the timer is active.
Thanks, I enjoyed reading this! To me the core ingredients of OOP like Alan Kay intended also remind me of what are considered well designed event-driven (micro)services —e.g. message driven, low coupling, high cohesion, doing one thing well and having a clear interface.
Thanks for the great article! I just had one remark/question. IMO the `const […sequence] = gen();` syntax is a bit confusing. I believe you could achieve the same thing by doing `const sequence = […gen()];` because you want to spread the results of the iterable to create an Array, is this true?