Comment on I'm creating a curated search engine for web developers. Asking for a feedback
themusicman@lemmy.world 10 months agoWhat? The previous comment said it’s “downright impossible to learn” which is nonsense.
|| means “Evaluate and use the left operand, unless it’s falsy, in which case evaluate and use the right operand instead”
?? means “Evaluate and use the left operand, unless it’s nullish, in which case evaluate and use the right operand instead”
They’re the same thing except for which values fall through to the second operand
xmunk@sh.itjust.works 10 months ago
Yea, in well aware.
But you had to learn that somewhere.
themusicman@lemmy.world 10 months ago
Exactly. We all learnt it, so “downright impossible to learn” is bullshit