Checks if the given range is empty.

Type signature

([min, max]: [number, number]) => boolean

Examples

empty([2, 2]);
// ⇒ true
Try in REPL
empty([1, 5]);
// ⇒ false
Try in REPL

Questions

  • How to check if a given range is empty (0-length)?

TypeScript sourceJavaScript source