Fix: actually update the code snippet, not just the blurb

This commit is contained in:
Robert Mennell
2017-12-14 00:17:19 -08:00
parent 465935215f
commit f37272cd01

View File

@ -5,6 +5,6 @@ Use `isFinite()` to check if the number is finite.
Use `Number()` to check if the coercion holds.
```js
const validateNumber = n => !isNaN(parseFloat(n)) && isFinite(n);
const validateNumber = n => !isNaN(parseFloat(n)) && isFinite(n) && Number(n) == n;
// validateNumber('10') -> true
```