Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

Array.isArray()

2 tags 1 category

The Array.isArray() static method determines whether the passed value is an Array.

Array.isArray() checks if the passed value is an Array. It performs a branded check, similar to the in operator, for a private field initialized by the Array() constructor.

It is a more robust alternative to instanceof Array because it avoids false positives and false negatives:

Array.isArray() rejects values that aren’t actual Array instances, even if they have Array.prototype in their prototype chain — instanceof Array would accept these as it does check the prototype chain. Array.isArray() accepts Array objects constructed in another realm — instanceof Array returns false for these because the identity of the Array constructor is different across realms.

Syntax example: Array.isArray(value)

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…