round. 此方法近似四捨五入,注意正負的差異. 1 2 3 4 5 6 7 8 9 10 11 12, console.log(Math.round(0.95)); // output: 1 console.log(Math.round(2));
確定! 回上一頁