E0716: unintuitive operator precedence when using & and << or >>
JavaScript's operator precedence can cause confusing situations and bugs when it comes to bitshifting with a bitwise and.
The code above looks like it evaluates another_variable & 0x1
first,
but it instead evaluates 0x1 << 0x2
first.
If this is intended behavior, it may be easier to read if you write parentheses:
Otherwise, to get the order of operations correct, add parentheses around the operands of &
: