Skip to content

isArray ​

Checks whether the provided value is an array.

Parameters ​

  • value (unknown): The value to check, which can be of any type.

Returns ​

  • boolean: true if the value is an array, otherwise false.

Usage ​

ts
isArray([1, 2]); // true
isArray('hello'); // false