Can someone explain why result evaluates to 20 in this statement?
let result = 10 ?? true ? 20 : 30;
Given nullish coalescing evalutes the statement in a left-to-right manner and is of higher precedence than a ternary operator, why is it safe to not assume that result should be 10?
Note: if a grouping operator is added, then result is 10.
let result = 10 ?? (true ? 20 : 30);