Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Set Value if variable is Not NaN. Reply To: Set Value if variable is Not NaN.

#180906
Chromawoods
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.