2 ms·
That's not an example of nontransitivity. You’ve only shown that some nontruthy values are unequal by == and some are equal by ==. Nontransitivity would be a ==
by dragonwriter 6y ago
That's not an example of nontransitivity. You’ve only shown that some nontruthy values are unequal by == and some are equal by ==. Nontransitivity would be a == b, b == c, c != a. But you have the much more expected b != a, b != c, c == a.
JS loose equality is intransitive, though; the standard example being:
'0' == 0; // true
0 == ''; // true
'0' == ''; // false