Keep away from issues
Why did we go over these examples? Ought to we keep in mind these peculiarities on a regular basis? Nicely, not likely. Really, these tough issues will steadily turn out to be acquainted over time, however there’s a strong approach to keep away from issues with them:
Deal with any comparability with undefined/null besides the strict equality
===
with distinctive care.
Don’t use comparisons
>= > < <=
with a variable which can be null/undefined, except you’re actually certain of what you’re doing. If a variable can have these values, verify for them individually.