Operators

Logical not (!)

Try the free JavaScript compiler

Converts operand truthiness to its opposite Boolean. Unlike AND and OR, it always produces a Boolean.

Formal Syntax & Structure

javascript syntaxjavascript
!value

Parameters & Attributes

NameTypeDescription
valueexpressionOperand to convert or invert.

Return Value

Boolean

Converted result.

Working Example

Example Snippetjavascript
console.log(!"");
JavaScript Reference