([8, 32, 189].sort()[0]) === (new Boolean(false) ? 189
: 8)
Why such a contrived example?! This all boils down to
new Boolean(false) == false
returning true
new Boolean(false) === false
returning false
The ?: operator is just not performing an implicit cast. The fact that
the Boolean object is different from the Boolean primitive type is...
...well unfortunate. That's why it's use is as an Object is deprecated
since JavaScript 1.3
You example gives the expected outcome if you call Boolean as a function:
([8, 32, 189].sort()[0]) === (Boolean(false) ? 189 : 8)
So, can we drop this dreaded debate now?