Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

for ...in statement to iterate object keys

for (let user in obj) {
  if (obj[user].online === true) {
    //code
  }
}
Source by forum.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #statement #iterate #object #keys
ADD COMMENT
Topic
Name
6+2 =