parseInt returns an integer or NaN.
NaN is false when evaluated.
On the other hand, 0 will also be false when evaluated.
If it evaluates to 0, it must evaluate to true.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available:
Description of changes:
parseInt returns an integer or
NaN
.NaN
isfalse
when evaluated. On the other hand,0
will also befalse
when evaluated. If it evaluates to0
, it must evaluate totrue
.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.