Trouble with loop challenge

Tell us what’s happening:
Can anyone explain to me why my solution is wrong ? What is the correct solution to this problem ? My solution should definitely work. I have no idea why it is wrong though.

Your code so far

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
  let count = 0;

  for (let users in obj) {
    if (users.obj === true) {


  return count;



  // change code above this line


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

Link to the challenge:

Please search the forum, already there a bunch of question posted related to this challenge.