Dad, self-employed, problem solver at heart, async all the way. Formerly a principal software engineer at Nuance Communications. Occasionally I tweet, blog and answer my own StackOverflow questions.
Dad, self-employed, problem solver at heart, async all the way. Formerly a principal software engineer at Nuance Communications. Occasionally I tweet, blog and answer my own StackOverflow questions.
I seldom use IIFEs, but I like your idea of prefacing with
void
. I typically name the function "iife" as well. (or iife1. iife2...)I find myself using them more often for generators or async generators, like that
getRacers
from the article:You can replace
winner = winner ?? p;
with
winner ??= p;
A good point, thanks. Though, the logical nullish assignment is fairly new (Chrome 85+, Node 15+).