감공사 2020. 2. 16. 23:28
728x90

✨ 반올림이 필요할 때 사용하는 helper method

💻Example Code

 

실행 결과

🧨 반올림이 필요할 경우에 사용할 수 있다.

👉 자세한 내용은 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round

 

Math.round()

The Math.round() function returns the value of a number rounded to the nearest integer.

developer.mozilla.org