Checks if the given ranges are equal.

Type signature

([a, b]: [number, number], [c, d]: [number, number]) => boolean

Examples

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

Questions

  • How to check if two ranges are equal?

TypeScript sourceJavaScript source