Checks if lengths of the given arrays differ.

Type signature

(a: any[], b: any[]) => boolean

Examples

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

Questions

  • How to check if array lengths differ?
  • How to check if the given arrays have different lengths?

TypeScript sourceJavaScript source