I can’t solve that exercise someone can help me please
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for---in-statement
let users = {
Alan: {
age: 27,
online: false
},
Jeff: {
age: 32,
online: true
},
Sarah: {
age: 48,
online: false
},
Ryan: {
age: 19,
online: true
}
};
function countOnline(obj) {
// change code below this line
function countOnline(obj) {
// change code below this line
// change code above this line
}
// change code above this line
}
console.log(countOnline(users));
We’ve defined a function, countOnline; use a for…in statement within this function to loop through the users in the users object and return the number of users whose online property is set to true.