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

 

'JavaScript > Built-in Method etc.' 카테고리의 다른 글

Set (Object)  (0) 2020.02.20
String.prototype.localeCompare()  (0) 2020.02.20
Math.abs()  (0) 2020.01.28
Math.PI  (0) 2020.01.28
Array.prototype.forEach()  (0) 2020.01.23

+ Recent posts