get number of object properties javascript code example
Example 1: javascript get number of elements in object
Object.keys(obj).length
Example 2: number of properties in object javascript
//To count objects own enumarable properties
const objectName={example:10}
console.log(Object.keys(objectName).length)