DEV Community

Discussion on: How to Get an Object Length

Collapse
 
nickymeuleman profile image
Nicky Meuleman • Edited

All enumerable properties, including ones with Symbols as keys.
Excluding all non-enumerable properties.

an object with:
1 enumerable property with string as key,
2 non-enumerable properties with a string as key,
1 enumerable property with Symbol as key
1 non-enumerable properties with Symbol as key.

Should return 2 as total length. (1 for string key and 1 for Symbol key)