JavaScript Array isArray()


The isArray() method checks if the specified parameter is an array. It returns a Boolean.

Array.isArray('my thing goes here'); // false


1 Parameter

This method takes one parameter:

  • value: the provided value to be checked

Returns a Boolean

It returns true if the provided value is an Array and false if not.

Array.isArray('one'); // false
Array.isArray(1); // false
Array.isArray(['first']); // true
Array.isArray({checked: true}); // false

Basic usage

Checking if a value is an Array.