Created
January 23, 2016 11:07
-
-
Save xeiter/8221f4966251d4bb4f94 to your computer and use it in GitHub Desktop.
Check if variable is an integer in JavaScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( my_variable !== parseInt(my_variable, 10) ) { alert("my_variable is an integer"); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment