Created
August 26, 2012 16:52
-
-
Save jpetto/3481617 to your computer and use it in GitHub Desktop.
JavaScript isArray
This file contains hidden or 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(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