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
Your input values are treated as string as they are textbox inputs. Parse the values first before adding them up.
e.g.
var principal = parseInt(princ.value); var interestrate = parseInt(interest.value);