abs

 

2023-07-12

1
console.log(Math.abs(-3.14)); // 返回 3.14