~运算的使用-num-1即~1=>-2  ~-1=>0NaN被当作0来运算所以
!!~string.indexOf("something")等价于string.includes("something")
~~更加容易被用到
~~运算会得到运算数的整数部分~~3.14 => 3 ~~-3.14 => -3 ~~NaN => 0   ~~-0 => 0Math.trunc()的唯一不同点是Math.trunc(NaN) => NaN Math.trunc(-0) => -0原文:https://www.cnblogs.com/shaddollxz/p/14902600.html