How to efficiently count the number of keys/properties of an object in JavaScript How to efficiently count the number of keys/properties of an object in JavaScript javascript javascript