Skip to content

Instantly share code, notes, and snippets.

@michaelwhyte
Last active January 30, 2018 21:08
Show Gist options
  • Select an option

  • Save michaelwhyte/b219c51c77a20d836722350a02483612 to your computer and use it in GitHub Desktop.

Select an option

Save michaelwhyte/b219c51c77a20d836722350a02483612 to your computer and use it in GitHub Desktop.
A function to determine if a value is a number even if the value is a string number
// Code from this stackoverflow question
// https://stackoverflow.com/questions/175739/is-there-a-built-in-way-in-javascript-to-check-if-a-string-is-a-valid-number
function isNumeric(num){
return !isNaN(num)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment