2 ms·
JS will await on literals too, it just immediately resolves to the value of the literal. I use this all the time in async functions with code branches, some of
by claytongulick 5y ago
JS will await on literals too, it just immediately resolves to the value of the literal.
I use this all the time in async functions with code branches, some of which await and some return an immediate value.