i mean, just its name is cool enough, “Nullish Coalescing”
javascript’s ?? is cool
what does that do
Here’s an example:
> 1 ?? 0 1 > undefined ?? 0 0 > bork ?? 0 // bork is not defined 0
wait, the last one isn’t correct, I think I’ve confused it with an object :P
return the left argument, unless the left argument is undefined or null, in which case return the right argument
ah cool
what does that do
Here’s an example:
wait, the last one isn’t correct, I think I’ve confused it with an object :P
return the left argument, unless the left argument is undefined or null, in which case return the right argument
ah cool