Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add two floating point numbers jquery

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: #add #floating #point #numbers #jquery
ADD COMMENT
Topic
Name
3+6 =