JavaScript Operator: bitwise NOT
[this page | pdf | back links]
In JavaScript,
the ~ operator is
the bitwise OR operator.
For example, ~ 6 in binary notation is ~ 110 so is 1(29 times)001, which is interpreted as a negative number
so is treated as -7 in decimal
notation.
NAVIGATION LINKS
Contents | Prev | Next | JavaScript Operators