validateNumber
Checks if the given value is a number.
- Use parseFloat()to try to convertnto a number.
- Use !Number.isNaN()to check ifnumis a number.
- Use Number.isFinite()to check ifnumis finite.
- Use Number()and the loose equality operator (==) to check if the coercion holds.