Last active
December 24, 2015 15:59
-
-
Save geastwood/6824327 to your computer and use it in GitHub Desktop.
isArray, determine array by Object toString property
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
// use Object toString method to determine Array | |
var isArray = function(obj){ | |
return Object.prototype.toString.call(obj) === '[object Array]'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment