title: I can't get the return statement to work properly
body: <p>I am trying to return return a value and display it in the console.(for now)
  The user ID is passed to a "function".
  The function will check for this ID in a database and should return the userName.
  I know that the correct data is found because the console.log returns the correct infirmation in function itself (see: THIS WORKS)
  But the returned value is "undefined" when used <code>return childData.userName;</code></p>
  
  <p>Calling the function</p>
  
  <pre><code>console.log( f_returnUserDetails(uid)
  </code></pre>
  
  <p>The function itself</p>
  
  <pre><code>  function f_returnUserDetails(a){
      console.log(a)
      var key;
      var childData;
      firebase.database().ref('/dataman-blabla/').orderByChild("uid").equalTo(a).on('value', function (snapshot) {
        snapshot.forEach(function(childSnapshot) {
            key = childSnapshot.key;
            childData = childSnapshot.val();
            console.log(childData.userName); //THIS WORKS
            return childData.userName; //THIS DOES NOT
        });
      });
    };
  </code></pre>