Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

round number 2 decimal places javascript

function roundTo2(num) {
  return Math.round( ( num + Number.EPSILON ) * 100 ) / 100;
}
Source by javascriptf1.com #
 
PREVIOUS NEXT
Tagged: #number #decimal #places #javascript
ADD COMMENT
Topic
Name
9+2 =