Skip to content

Instantly share code, notes, and snippets.

@farinspace
Created November 23, 2011 19:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farinspace/1389684 to your computer and use it in GitHub Desktop.
Save farinspace/1389684 to your computer and use it in GitHub Desktop.
Javascript function to check if obj is an array
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