DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
6+9 =
Submit