Comment on I'm creating a curated search engine for web developers. Asking for a feedback
themusicman@lemmy.world 10 months ago?? is intuitive if you (truly) understand ||
Comment on I'm creating a curated search engine for web developers. Asking for a feedback
themusicman@lemmy.world 10 months ago?? is intuitive if you (truly) understand ||
xmunk@sh.itjust.works 10 months ago
Yea, I don’t know why people want to learn things - it’s easier to just know them! /s
kryptonianCodeMonkey@lemmy.world 10 months ago
Have you tried divining syntaxes from reading the entrails of a sacrificed goat?
abbadon420@lemm.ee 10 months ago
It works on my machine
themusicman@lemmy.world 10 months ago
What? 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