title: In firebase (javascript), how can I get data for the currently logged in user?
body: <p>I've spent a few days researching for the solution. I have found many answers that were quite helpful, but still I haven't been able to find a solution that fully resolved my problem. Basically all I want to do is to get <strong>current user's</strong> data (stored in firebase realtime database) and display them on the user's screen.</p>
  
  <p>So far, I can display data for all the user. But how can I have it display data for <strong>only the current user</strong>? (How can I get the push key of only the <strong>current user</strong>?)</p>
  
  <ul>
  <li>I'm not an experienced programmer (less than a year). Please use a language that is easy to understand.</li>
  <li>I've gone through all the firebase documentation. Please don't just give me the copy of the documentation or the link to it.</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/ppnG6.png" rel="nofollow noreferrer">Screenshot: Firebase realtime database</a></p>
  
  <p><a href="https://i.stack.imgur.com/xtBbr.png" rel="nofollow noreferrer">Screenshot: JavaScript function for retrieving current user's data</a></p>
  
  <p><a href="https://i.stack.imgur.com/rbGwx.png" rel="nofollow noreferrer">Additional JavaScript screenshot</a></p>