Fix: do the change in the individual .md file
This commit is contained in:
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
Use `!isNaN` in combination with `parseFloat()` to check if the argument is a number.
|
Use `!isNaN` in combination with `parseFloat()` to check if the argument is a number.
|
||||||
Use `isFinite()` to check if the number is finite.
|
Use `isFinite()` to check if the number is finite.
|
||||||
|
Use `Number()` to check if the coercion holds.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const validateNumber = n => !isNaN(parseFloat(n)) && isFinite(n);
|
const validateNumber = n => !isNaN(parseFloat(n)) && isFinite(n);
|
||||||
|
|||||||
Reference in New Issue
Block a user