A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/Array/isArray below:

isArray · WebPlatform Docs

isArray Summary

Determines whether an object is an array.

Syntax
Array.isArray( object )
object
Required. The object to test.
Return Value

Boolean value. Either true if object is an array; otherwise, false.

If the object argument is not an object, false or undefined is returned.

Examples

The 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

Attributions

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