Checks if the given array contains more than one element.

Type signature

<T>(xs: T[]) => boolean

Examples

multiple([1, 2, 3]);
// ⇒ true
Try in REPL
multiple([1, 2]);
// ⇒ true
Try in REPL
multiple([1]);
// ⇒ false
Try in REPL
multiple([]);
// ⇒ false
Try in REPL

Questions

  • How to check if an array contains multiple elements?
  • How to check whether multiple values exist within an array?

TypeScript sourceJavaScript source