6.1.6.1.2 Number::bitwiseNOT ( x ) The abstract operation Number::bitwiseNOT takes argument x (a Number) and returns an integral Number. It performs the following steps when called:
Let oldValue be ! ToInt32(x).
Return the result of applying bitwise complement to oldValue. The mathematical value of the result is exactly representable as a 32-bit two's complement bit string.
取反操作符会将Number类型变量转换为整型。而一个整数取反两次则显然是自身。
https://tc39.es/ecma262/multi...