### 可將數字取一個四捨五入的做法 ```javascript // 隨機宣告3組數字如下: const num1 = 10.5; const num2 = 11.7; const num3 = 12.4; // 用 conole.log 去 print 最後的結果: console.log(Math.round(num1), Math.round(num2), Math.round(num3)); // 四捨五入後: 10.5 -> 11 11.7 -> 12 12.4 -> 12 ``` ### 結語: - 這個應用通常會出現在需要做數值處理的部分: - 例如像是天氣 APP 會 show 的數值。