Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to convert integer to double in javascript

/* 
	All numbers in JavaScript are doubles: that is, they are stored as 64-bit IEEE-754 doubles. 
    That is, the goal is not to get a "double": the goal is to get the string reprsentation of 
    a number formatted as "YYY.XX". For that, consider Number.toFixed, for instance: 
 */

(100).toFixed(2)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #integer #double #javascript
ADD COMMENT
Topic
Name
7+5 =