I was surprised by this code:
if (a =! b) { // let it be on false
...
}
But a
is never assigned by a value. What's this operator about?
That's two operators, =
and !
, not one. It might be an obfuscated way of writing
a = !b;
if (a) {
// whatever
}
setting a
to the logical inverse of b
, and testing whether the result is true (or, equivalently, whether b
was false).
Or it might be a mistyping of a != b
.