Y
Hacker News
new
|
ask
|
show
|
jobs
by
DrJokepu
3427 days 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