I\'m trying to calculate the number of payments but output was wrong so i tried to calculate a simple operation on the month value.But \"+\" operator doesn\'t sum my values it a
The values you are summing are strings. You need to convert them to integers:
parseInt(principal)+parseInt(interestate)
The reason for this is that input values are always strings. AFAIK, this is even if you set the type to number. parseInt(s) converts a string s to an int.