title: why am i not getting 1 as no of online users?
body: <p>Why is the user online status is always coming <code>undefined</code> in the following:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function countOnline(usersObj) {
    
    var c=0;
    for(let user in usersObj){ 
      console.log([user]['online']);
      if ([user]['online']==true){c++}
    }
    return c 
  }
  
  debugger;
  
  countOnline({ 
    Alan: { online: false }, 
    Jeff: { online: true }, 
    Sarah: { online: false } 
  });</code></pre>
  </div>
  </div>
  </p>