unary operators
Syntax
not <operand>
not true
not false
not bookIsHardcover()
Explanation
The not
operator reverses a boolean. So if operand evaluates to true
, not
gives you false
,
if operand evaluates to false
, not
turns it into true
.