I personally hate the use of the || operator in this context, but that's mostly because my background is a C# one where I read the operator and think that b would be assigned to true since a and 100 would both be evaluated as booleans.
Obviously they wouldn't, but to me ?? is way more intuitive than the use of || in this context.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I personally hate the use of the
||operator in this context, but that's mostly because my background is a C# one where I read the operator and think thatbwould be assigned totruesinceaand100would both be evaluated as booleans.Obviously they wouldn't, but to me
??is way more intuitive than the use of||in this context.