正在浏览:正数

JS负数转正数函数:Math.abs(x)。示例如下: let x = -5;console.log(Math.abs(x));