JS负数转正数函数:Math.abs(x)。示例如下:
let x = -5;
console.log(Math.abs(x));
(adsbygoogle = window.adsbygoogle || []).push({});
来源:https://www.02405.com/archives/1724
JS负数转正数函数:Math.abs(x)。示例如下:
let x = -5;
console.log(Math.abs(x));
来源:https://www.02405.com/archives/1724