The following code is what I am currently working with:
var num1=$("#num1").val();
//the num1 value is 12.60
//html code for this number <input id="num1" value="12.60" />
num1=parseFloat(num1).toFixed(2);
var num2=$("#num2").text();
//the num2 value is 1.00
//html code for this number <span id="num2">1.00</span>
num2=parseFloat(num2).toFixed(2);
var sum=num1+num2;
console.log(sum);
My expectation is to see 13.60
but the actual output is 12.601.00
(added as a string).
Can anyone point out if I am overlooking something?