Tell us what’s happening:
I am having difficulty developing a code for this problem
Your code so far
function countOnline(usersObj) {
// Only change code below this line
for (let prop in usersObj) {
console.log(prop[true])
}
// Only change code above this line
}
function countOnline(usersObj) {
// Only change code below this line
for (let prop in true) {
console.log(prop[true])
}
// Only change code above this line
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15
.
Challenge: Iterate Through the Keys of an Object with a for…in Statement
Link to the challenge: