Operator Associativity

Most operators have left-to-right associativity. This means that when two operators of the same precedence appear in an expression, they are evaluated from left to right.

let result = 5 > 4 > 3;
console.log(result); // false, not true

This expression is interpreted as (5 > 4) > 3, which becomes true > 3. Since true coerces to 1 in numeric comparisons, this becomes 1 > 3, which is false.