July 1998
Intermediate to advanced
1456 pages
65h 5m
English
~ — NN 2 IE J1 ECMA 1
The bitwise NOT operator. This unary operator inverts the value of the binary digit in each column of a number. For example, the binary 6 is 0110 (with many more zeros off to the left). After the negation operation on each column’s value, the binary result is 1001, plus all zeros to the left inverted to 1s. The decimal equivalent is a negative value (-5).
var n = ~6
Read now
Unlock full access