绝对值方法 console.log(Math.abs(1)); //1console.log(Math.abs(-1)); //1console.log(Math.abs('-1')); //1 会把字符型-1转换成数字型console.log(Math.abs('pink')); //NaN