var a =10;
var b=10;
var c=a+b;
alert(c);
//in double case
var e=10.5;
var f=10.5;
alert(e+f);
//forcelly convert to int
alert(parseInt(e)+parseInt(f));
//forcelly convert to float
alert(parseFloat(a)+parseFloat(b));
Example :
https://jsfiddle.net/v0rjek67/6/