Answer the question
In order to leave comments, you need to log in
ParseFloat correct work?
Essence of the question:
var extra_fee_code=parseFloat(ans['extra_fee_code']);
var extra_fee_subcode=parseFloat(ans['extra_fee_subcode']);
var extra_fee_payable=parseFloat(ans['extra_fee_payable']);
As a result, it produces NaN how to fix it?
Answer the question
In order to leave comments, you need to log in
It's hard to guess what exactly you have in ans .. But maybe so?
var extra_fee_code=parseFloat(ans.extra_fee_code);
var extra_fee_subcode=parseFloat(ans.extra_fee_subcode);
var extra_fee_payable=parseFloat(ans.extra_fee_payable);
NaN appears when you try to convert something into a number that can't be converted. For example: undefined, "", "string", etc.
Check what's in those variables initially.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question