Determines whether an object is an array.
SyntaxArray.isArray( object )
Boolean value. Either true if object is an array; otherwise, false.
If the object argument is not an object, false or undefined is returned.
ExamplesThe following example illustrates the use of the Array.isArray function.
var ar = [];
var result = Array.isArray(ar);
var ar = new Array();
var result = Array.isArray(ar);
var ar = [1, 2, 3];
var result = Array.isArray(ar);
var injectingString = Array.isArray("an array");
document.write(injectingString);
var injectingObject = Array.isArray({});
document.write(injectingObject);
See also Other articles
Specification
15.4.3.2 Array.isArray ( arg ) ECMAScript® Language Specification Standard ECMA-262 5.1 Edition / June 2011
AttributionsMicrosoft Developer Network: Article
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4