A few time ago, I saw in a JavaScript application (I don't remember which one is) the use of true === $var
instead of $var === true
. Example:
if (true === $var) {
// do something
}
I think these comparisons are differnet but I can see why — someone can explain it for me? And plus: when I should use and when I shouldn't.
Duplicated?
I searched on the web but no results.