how to sum two var in jquery

JavaScript
var a = 1;
var b = 2;
var c = (+a) + (+b);
alert(c); //or whatever you want
Source

Also in JavaScript: