Checks if the given argument is an array.

Type signature

(x?: unknown) => boolean

Examples

array([1, 2, 3]);
// ⇒ true
Try in REPL
array({ a: 1 });
// ⇒ false
Try in REPL

Questions

  • How to check if a given value is an array?

TypeScript sourceJavaScript source