The logical NOT (!
) (logical complement, negation) operator takes truth to
falsity and vice versa. It is typically used with boolean (logical)
values. When used with non-Boolean values, it returns false
if its single
operand can be converted to true
; otherwise, returns true
.