JavaScript: Array.isArray

By Xah Lee. Date: . Last updated: .
Array.isArray(value)
Return true if value is a array object. (not a Array-Like Object .) Else, false.
// real array
console.log(
  Array.isArray(["a", "b"]),
);

// array-like object
console.log(
  Array.isArray({ 0: "a", 1: "b", length: 2 }) === false,
);

JavaScript: Array-Like Object

BUY
ΣJS
JavaScript in Depth

JS Obj Reference

Array

prototype