! (NOT)
Converts the operand to boolean type: true/false.
Returns the inverse value.
he syntax is pretty simple: result = !value;
e.g.
alert( !true ); // false
alert( !0 ); // true
A double NOT !! is sometimes used for converting a value to boolean type:
e.g
alert( !!"talha" ); // true
alert( !!0 ); // false
Top comments (0)