On this page
  1. Array.isArray
  2. Signature & Overview
  3. Notes & Pitfalls
  4. Example

Array.isArray

Prev: from | Up: Array | Next: sort
Rel: Array, Array & Typed Arrays Guide
Ref: MDN Web Docs — Array.isArray
Tags: #public #web #javascript #builtins #array #tier/core


Signature & Overview

Array.isArray(value)

Reliably checks whether value is an Array, even across iframes/realms.

Notes & Pitfalls

Example

console.assert(Array.isArray([1, 2, 3]) === true);
console.assert(Array.isArray({ length: 3 }) === false);

Linked from

Related notes