Why check for !isNaN() after isFinite()?
The only difference is this: !isNan(1/0) // –> true isFinite(1/0) // –> false isNaN checks whether the argument is a number or not. The Infinities (+/-) are also numerical, thus they pass the isNaN check, but don’t pass the isFinite check. ** Note that any string which can be parsed as a number (“2”, “3.14”) … Read more