Objectkeysobjlength
Objectkeysobjlength refers to the JavaScript expression Object.keys(obj).length, a common idiom for counting the number of own enumerable properties on an object. Object.keys(obj) returns an array containing the object's own property names that are enumerable, and the length property of that array gives the count.
What it counts and what it excludes: it counts only enumerable own properties directly on the object,
Practical use and patterns: Object.keys(obj).length is widely used to determine the size of an object, to validate
Limitations and alternatives: since it only counts enumerable own properties, it will not reflect non-enumerable properties
Example: const obj = {a:1, b:2, c:3}; Object.keys(obj).length yields 3.