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
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.