Page 1 of 1
NAN instead of 0
Posted: Wed Jan 25, 2023 2:12 am
by openomsk
Hello! I have a question about calculations. For example, you add the values of checkboxes and other elements. If none of the checkboxes is initially selected, or then NAN is given in the final amount. How can I make it be 0?
Re: NAN instead of 0
Posted: Wed Jan 25, 2023 7:13 am
by Pablo
What do you mean by 'cleaning'?
To which part of software is this question related?
Re: NAN instead of 0
Posted: Wed Jan 25, 2023 8:37 am
by openomsk
there was an automatic substitution of the word, but I didn't notice
fixed
Re: NAN instead of 0
Posted: Wed Jan 25, 2023 9:05 am
by Pablo
Note that this is not specifiuc to WWB, this is standard browser behavior :
But you can use JavaScript to check for NaN
https://developer.mozilla.org/en-US/doc ... ects/isNaN