isNumber
The isNumber function checks if the given value is a number.
Works in: HTML5, React JS, Node.js
| Parameter | Type | Default | Description |
|---|---|---|---|
number | string | number | undefined | The value to check. |
Usage
Example: Check if Value is a Number
const value = 123;
const isValidNumber = nfsfu234FormValidation.isNumber(value);
console.log(isValidNumber); // trueExample: Check if Value is a Number
const value = "123";
const isValidNumber = nfsfu234FormValidation.isNumber(value);
console.log(isValidNumber); // trueSee also
Last updated on