JavaScript Array isArray() method
determines whether the passed value is an array

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

syntax

Array.isArray(value)

value The value to be checked.

Array.isArray() method returns true if an object is an array.

Array.isArray() method returns false if an object is NOT an array.

Array.isArray() method returns true for any value that was created using the array literal syntax or the Array constructor.

syntax description
determine whether passed value is an array
Array.isArray(myValue)