how to check that string is a valid integer or not in js code example
Example: how to check if a string is an integer javascript
isNaN(num) // returns true if the variable does NOT contain a valid number
isNaN(num) // returns true if the variable does NOT contain a valid number