Favorites

JavaScript Array.isArray() Method

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
Array.isArray()
JavaScript Array Static methodThis method is supported by all modern browsers.
Updated 28th November 2026

The Array.isArray() static method checks whether a value is an array, returning true or false.

Description

The Array.isArray() static method determines whether the value passed to it is an array. It is the reliable way to check, because arrays are objects and typeof [] returns "object".

It also works for arrays created in other windows or iframes, where value instanceof Array would return false because each window has its own Array constructor. Array-like objects, such as a NodeList, arguments or typed arrays, are not arrays and return false.

Use it before calling array methods on values that might be something else, such as function arguments or parsed JSON. It's the standard check used by libraries and in type-checking code. Note that it returns true for Array.prototype itself, which is an array, but that rarely matters in practice.

Syntax

Array.isArray(value)

Parameters

  • valueThe value to check.

Return Value

true if the value is an array, otherwise false.

Example

console.log(Array.isArray([1, 2, 3]));
console.log(Array.isArray([]));
console.log(Array.isArray('abc'));
console.log(Array.isArray({ length: 2 }));
console.log(typeof []);   // why isArray() is needed

Browser Support

The following information will show you the current browser support for the Array.isArray() method. Hover over a browser icon to see the version that first introduced support for this method.

This method is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee