Returns the number of entries within the given object.

Type signature

<T>(xs: GenericObject<T>) => number

Examples

length({ a: 1, b: 2, c: 3 });
// ⇒ 3
Try in REPL

Questions

  • How to check how many entries are in an object?

TypeScript sourceJavaScript source