DEV Community

Discussion on: How TypeScript 3.7 Helps Quality

Collapse
 
integerman profile image
Matt Eland

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.