位运算bit

按位否 Bitwise Not (~) 按位取反 ~N 相当于 -(N + 1),~55 => -(55 + 1) => -56 应用: ~(-1) = 0 function boolIndex(index){ return Boolean(~index) } ...