Last active
December 19, 2015 23:59
-
-
Save noyobo/6037939 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(!Array.isArray) { | |
Array.isArray = function (vArg) { | |
return Object.prototype.toString.call(vArg) === "[object Array]"; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment