Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript floating point addition

var val = (parseFloat('2.3') + parseFloat('2.4')).toFixed(2)
//if you are adding dynamic values then use following example
var a = 2.3;
var b = 2.4;
var val = (parseFloat(a)+parseFloat(b)).toFixed(2);
 
PREVIOUS NEXT
Tagged: #javascript #floating #point #addition
ADD COMMENT
Topic
Name
7+4 =