function _int(value) { // 补全代码 return parseInt(value); } /*直接取整有六种方法: 1.parseInt() 2.按位取反~~number,效率最高,相当于Math.floor() ~ 是按位取反运算符,两个 ~ 就是按位取反后再取反 3.number^0,经测试,这个效率最低 4.number<<0 5.number>>0 6.Math.floor()向下取整,但是效率很低 我在我的同名CSDN博客上详细写了这个题。 */
function _int(value) { // 补全代码 return parseInt(value); } /*直接取整有六种方法: 1.parseInt() 2.按位取反~~number,效率最高,相当于Math.floor() ~ 是按位取反运算符,两个 ~ 就是按位取反后再取反 3.number^0,经测试,这个效率最低 4.number<<0 5.number>>0 6.Math.floor()向下取整,但是效率很低 我在我的同名CSDN博客上详细写了这个题。 */