Created
April 7, 2013 16:49
-
-
Save gotofritz/5331269 to your computer and use it in GitHub Desktop.
//gets type of a variable, all lower case
This file contains 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
//gets type of a variable, all lower case | |
function get_type( what ){ | |
return Object.prototype.toString.call( what ).slice( 8,-1 ).toLowerCase(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment