2 ms·
I think using `or` for default fallbacks is generally considered bad practice because it disallows all falsey values, like `0` and `{}`. It doesn't matter in t
by Asraelite 5y ago
I think using `or` for default fallbacks is generally considered bad practice because it disallows all falsey values, like `0` and `{}`.
It doesn't matter in this particular case because the only falsey List is `[]` anyway, but it's a bad habit.
JavaScript added the `??` operator for this specific problem.