function test(input){ var value = input != 1; }
In the above, what is the line inside of the function doing and how does it work?
See Operator Precedence.
!= has a precedence of 9 and = has a precedence of 17.
!=
=
Therefore it evaluates input != 1 and then assigns the result to value.
input != 1
value