I am trying to do maths and i been getting values such as 200052 i.e if i add 2000+52, where it should be 2052. What am i doing wrong or missing something?
//get value of amount eneterd
amount = document.getElementById("amount").value;
//apply percentage
if(rateExcel.checked = true){
total= parseINT((amount/100) * 5);
total= total + parseINT(amount);
//still i get the same, like 20052 instead of 252.
};
Edit: The input is integer, not a string! I see many people trying to be ninja about telling to use parseINT(), but i tried and it didn't work.