1、描述
此方法返回数字的绝对值。
2、语法
它的语法如下:
Math.abs( x )
3、参数
x:一个数字。
4、返回值
返回数字的绝对值。
5、使用示例
JavaScript Math abs() Method
6、输出
-1 : 1null : 020 : 20string : NaN
此方法返回数字的绝对值。
它的语法如下:
Math.abs( x )
x:一个数字。
返回数字的绝对值。
JavaScript Math abs() Method
-1 : 1null : 020 : 20string : NaN