ink
ink copied to clipboard
logical operators precedence
is logical operators (and, or, &&, ||) precedence intentionally the same? Left to right? I think usually 'and' has higher precedence than 'or'. But maybe left to right is more intuitive for non-programmers?
Example:
ink:
{ true or false and false }
{ false and false or true}
out:
false
true
while for example in JS:
> true || false && false
true
> false && false || true
true