3 ms·
It's not really a ternary operator though, because the value that is tested for existence is only evaluated once, e.g. instead of a != null ? fn(a) : null
by DrJokepu 10y ago
It's not really a ternary operator though, because the value that is tested for existence is only evaluated once, e.g. instead of
a != null ? fn(a) : null
it's more like
(a, fn) => a != null ? fn(a) : null