I can’t figure out what I’m doing wrong with this block of code. Reading other solutions on the forum, I feel I’m solving this challenge properly, but it just won’t pass. Not sure If I’m misspelling something or if there’s any other errors. Just looking for a solution, thanks!
function countOnline(usersObj) {
// Only change code below this line
let count = 0;
for (let user in obj) {
if (obj[user].online == true) {
count++;
}
}
return count;
// Only change code above this line
}