Math.round(x) 會把浮點數四捨五入為最接近的整數。
Math.round(0.5); // 1 Math.round(0.49); // 0 Math.round(-2.6); // -3
遇到 .5 時會往上捨入,這一點在處理負數時要特別留意。