Array static methods

Array.isArray()

Try the free JavaScript compiler

Tests whether the supplied value is an Array according to the language’s array check. It works across realms and does not mistake ordinary array-like objects for arrays. A revoked Proxy can throw.

Formal Syntax & Structure

javascript syntaxjavascript
Array.isArray(value)

Parameters & Attributes

NameTypeDescription
valueanyValue to inspect.

Return Value

boolean

True for arrays and applicable proxies to arrays.

Working Example

Example Snippetjavascript
console.log(Array.isArray([]),Array.isArray({length:0}));
JavaScript Reference