Skip to content

Instantly share code, notes, and snippets.

@dannycallaghan
Created October 3, 2013 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dannycallaghan/6806792 to your computer and use it in GitHub Desktop.
Save dannycallaghan/6806792 to your computer and use it in GitHub Desktop.
isArray() in ECMAScript < 5
/* isArray() in ECMAScript < 5 */
if ( typeof Array.isArray === "undefined" ) {
Array.isArray = function ( arg ) {
return Object.prototype.toString.call( arg ) === "[object Array]";
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment