Tell us what’s happening:
I have seen the hints and y’alls questions on this already but I really don’t get how that answer is the answer. If anyone could explain the outcome to me i would really appreciate it.
Thank you
Your code so far
const users = {
Alan: {
online: false
},
Jeff: {
online: true
},
Sarah: {
online: false
}
}
function countOnline(usersObj) {
// Only change code below this line
// Only change code above this line
}
console.log(countOnline(users));
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Challenge: Basic Data Structures - Iterate Through the Keys of an Object with a for…in Statement
Link to the challenge: