Skip to main content

isArray

function isArray
Jump to headingisArray(object: unknown): object is unknown[]
Deprecated

Alias for Array.isArray().

Returns true if the given object is an Array. Otherwise, returns false.

import util from 'node:util';

util.isArray([]);
// Returns: true
util.isArray(new Array());
// Returns: true
util.isArray({});
// Returns: false

Parameters Jump to heading

Jump to headingobject: unknown

Return Type Jump to heading

object is unknown[]
Back to top