Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find object length in javascript

//var size = Object.keys(myObj).length;

let object = {
  user:"hello",
  password:"123"
}

console.log(Object.keys(object).length)
> prints: 2
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #object #length #javascript
ADD COMMENT
Topic
Name
2+6 =