Can someone explain this?
1 == 1 //true, as expected 1 === 1 //true, as expected 1 == 1 == 1 //true, as expected 1 == 1 == 2 //false, as expected 1 === 1 === 2 //false, as expected 1 === 1 === 1 //false? <--
There is also a name for logical logic that compares more than two numbers in this way (I called it a “three-listed comparison”, but I think it would be wrong ...)
source share