当前位置: 主机百科 » 资源 » 技术 » 正文

JS负数转正数

JS负数转正数函数:Math.abs(x)。示例如下:

1
  let x = 5;  console.log(Math.abs(x));

未经允许不得转载:主机百科 » JS负数转正数

相关文章