Created
October 11, 2010 15:16
-
-
Save cms/620667 to your computer and use it in GitHub Desktop.
Array.isArray
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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