Skip to content

Instantly share code, notes, and snippets.

@farinspace
Created November 23, 2011 19:44
Show Gist options
  • 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