Hacker News new | ask | show | jobs
by canacrypto 2502 days ago
I've found it's better to write normal conditions that are easier to read and leave it to your linter to catch unintended assignments.
1 comments

Are they really easier to read though? A lot of the time which variable being tested is obvious, so it makes sense to put the important information - the value - first.
> so it makes sense to put the important information

Both sides of the equality check are equally important.

I think he should have written "it makes sense to put the non-obvious information first" as it contrasts better with the first part of the sentence