Skip to content

Instantly share code, notes, and snippets.

@jpetto
Created August 26, 2012 16:52
Show Gist options
  • Save jpetto/3481617 to your computer and use it in GitHub Desktop.
Save jpetto/3481617 to your computer and use it in GitHub Desktop.
JavaScript isArray
if (typeof(Array.isArray) !== 'function') {
Array.isArray = function(value) {
return Array.prototype.toString.apply(value) === '[object Array]';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment