I was checking out JSLint, and some of the rules piqued my interest. Particularly this:
Disallow == and !=
Disallow ++ and --
Why is it a bad idea to disallow these? I understand the first part, basically it wants me to do ===
instead of ==
. I don't understand why though. I understand the difference between the two, I just want to know why is it bad practice. Some times I really want to do ==
for example so that it would evaluate true for undefined == null
The second one, well I don't understand at all. Does it want me to do myInt += 1 instead of myInt++ ?
Thanks!