The specific example I have will increment obj[s] if it's truthy (has a value), and if it's falsey (doesn't exist in the object yet) it will set it equal to 1 and thus add it to the object.
But what I'm asking about, in general, looks like:
something = doIfTruthy || doIfFalsey
I'm thinking it must have a name, just like how we call this "ternary or conditional operator"
something = condition? ifTrue: ifFalse
I'd like to be able to refer to it by a proper name in my notes. Right now I'm just calling it "exploit truthy/falsey" because that's how I use it.
I'm also wondering what you call this kind of expression, because it's similar:
something = condition && ifTrue