update snippets 0-All
This commit is contained in:
committed by
Agamemnon Zorbas
parent
39164e9cbf
commit
e7e687f60c
@ -8,5 +8,8 @@ Use `Number()` to check if the coercion holds.
|
||||
|
||||
```js
|
||||
const validateNumber = n => !isNaN(parseFloat(n)) && isFinite(n) && Number(n) == n;
|
||||
// validateNumber('10') -> true
|
||||
```
|
||||
|
||||
```js
|
||||
validateNumber('10') -> true
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user