A thing about yield
in JS. It’s almost going out of fashion and only makes
sense for library authors at this point. Unlike languages that have support for
multiple threads, in JS (and web-environments in particular) if you want to
interlace non-IO work, you have to use yield
. Cooperative multitasking, pretty
much. You can also write your own Streams
library like Elixir with this.