DEV Community

[Comment from a deleted post]
Collapse
 
vonheikemen profile image
Heiker

Every number except 0 and NaN is considered a "truthy value". And if something is "truthy" then it pass the evaluation of the if statement.