Created
November 19, 2014 14:00
-
-
Save shaunwallace/6624f57a4ffea7131712 to your computer and use it in GitHub Desktop.
Array.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
| // all following calls return true | |
| Array.isArray([]); | |
| Array.isArray([1]); | |
| Array.isArray(new Array()); | |
| // all following calls return false | |
| Array.isArray(); | |
| Array.isArray({}); | |
| Array.isArray(null); | |
| Array.isArray(undefined); | |
| Array.isArray(17); | |
| Array.isArray('Array'); | |
| Array.isArray(true); | |
| Array.isArray(false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment