Home › Forums › JavaScript › Set Value if variable is Not NaN. › Reply To: Set Value if variable is Not NaN.
August 28, 2014 at 3:16 am
#180906
Participant
You are not checking the sum for NaN,
you are checking it for ''
(empty string). So you could replace if (sum !=='')
with if (!isNaN(sum))
and it would work.