|
|
|
|
|
by atirip
2839 days ago
|
|
Yes. In our codebase it is forbidden to test for true/false, only truthy/falsy is allowed. The only place where === is needed and allowed is testing for if function argument is omitted. Otherwise == and yes, all developers understand that and agree and no, we haven’t had any bugs because of that. Big and complex web app, not my first, the previous gig was even bigger, same approach. Works like a charm. |
|
I can think of one instance where I needed identity instead of equality, and I took the time to refactor to ensure that equality would work.