! (NOT)

Alert( !!"non-empty string" ); // true
alert( !!null ); // false

The boolean NOT operator is represented with an exclamation sign ! The operator accepts a single argument and does the following: 1. Converts the operand to boolean type: true/false. 2. Returns an inverse value.


Result = !value;
A double NOT !! is sometimes used for converting a value to boolean type.

! (NOT) — Structure map

Clickable & Draggable!

! (NOT) — Related pages: