Coming from a background of mostly web development, I was a fan of weak-typed languages for a long time. Eversince I started getting more and more into, for example, Java, I like strong-typed languages better. It just feels cleaner to work with correct types and not compare apples and oran… I mean numbers and strings. And even weak-typed languages usually allow
you to work with types – they also just allow you to be lazy. And these days I just try to get rid of laziness in programming as much as possible.
@ Old Pedant (yes, some people can get your name right
All in all: I personally prefer using === whenever I can. I also check types. Currently I'm working with qooxdoo
But let's forget about personal preferences. What about == versus === in pure terms of performance? Well, I prepared a little test: http://jsperf.com/the-truth-about-comparisons
It tests all combinations of types and result for both == and ===. What's the result?
Well: As long as types are equal, == and === don't make much of a difference. Actually, === may even be slightly slower. But that's the point: slightly
slower and only maybe. Doesn't really surprise, does it?
But this wasn't the point, because people argue in favor of == when types are different. For different types, the result couldn't be much clearer: === outperforms == by a lot. And that's simply because once the types are checked to be different, actually checking the value becomes unnecessary.
So whenever you need to care about performance (i.e. loops), === should be the way to go. As for ==, there is no real argument in favor of it except that you can be lazy not to care about the types, which will save you some code.
To summarize it with a personal note again: Laziness should never ever be a justification for your code. Also, performance is always an issue on the web, especially if mobile development is involved.