Created
November 23, 2011 19:44
-
-
Save farinspace/1389684 to your computer and use it in GitHub Desktop.
Javascript function to check if obj is an array
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
function isArray( obj ) | |
{ | |
if ( Object.prototype.toString.call( obj ) === '[object Array]' ) return true; | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment