know the features of your language
know the features of your language
know the features of your language
You're viewing a single thread.
we can remove the return!
js
const fn = (a, b) => a || b
undefined
const fn = (a, b) => a ?? b
Gotta love some peer review
But this just creates a function. You still have to call it.
undefined
((a, b) => a ?? b)();