I need to add up two numbers input by the user. To do that, I create two input fields, retrieve values from them , using .val(), in two separate variables and then add them.
You can use parseInt(...)
Example:
var num = parseInt("2", 10) + parseInt("3", 10); // num == 5