Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript convert number to string with 2 decimal places

(Math.round(num * 100)/100).toFixed(2); // 1.346 -> 1.35
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #convert #number #string #decimal #places
ADD COMMENT
Topic
Name
5+9 =