What ~ does, and is is safe to use?
This question already has an answer here:
Bitwise Operators
~a
Performs the NOT operator on each bit.
Example:
9 (base 10) = 00000000000000000000000000001001 (base 2)
~9 (base 10) = 11111111111111111111111111110110 (base 2) = -10 (base 10)
链接地址: http://www.djcxy.com/p/74964.html上一篇: JQuery:这个代码是什么意思?
下一篇: 什么〜做,并且是安全使用?