Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js obj getting count of properties

let count = 0;
for (let k in myobj) if (myobj.hasOwnProperty(k)) count++;
 
PREVIOUS NEXT
Tagged: #js #obj #count #properties
ADD COMMENT
Topic
Name
7+3 =