Skip to content

Instantly share code, notes, and snippets.

@cms
Created October 11, 2010 15:16
Show Gist options
  • Save cms/620667 to your computer and use it in GitHub Desktop.
Save cms/620667 to your computer and use it in GitHub Desktop.
Array.isArray
if (typeof Array.isArray != 'function') {
Array.isArray = (function () {
var toString = Object.prototype.toString;
return function (obj) {
return toString.call(obj) == '[object Array]';
};
})();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment