Operators
Bitwise not (~)
Inverts bits. Number operands convert to signed 32-bit form; BigInt bitwise inversion uses arbitrary-length signed representation.
Formal Syntax & Structure
javascript syntaxjavascript
~valueParameters & Attributes
| Name | Type | Description |
|---|---|---|
| value | expression | Operand to convert or invert. |
Return Value
Number or BigInt
Converted result.
Working Example
Example Snippetjavascript
console.log(~5);