title: proper usage of async and await in JS?
body: <pre><code>import Firebase from './Firebase'
  import videoManager from './videoManage';
  
     async function getAllDatabaseLocations() {
          await let ref = Firebase.database().ref("locations")
          var user_locations = [];
          ref.on("value", function (snapshot) {
              snapshot.forEach(function (datas) {
                  const data = datas.val();
  
                  vid_manage = new videoManager(data.videourl);
                  vid_ref = vid_manage.getLocationVideoUrl();
                  vid_ref.getDownloadURL().then(function (url) {
                      videourl = url;
                     }).catch(function (error) {
                  });
                  let lokation = data.lokation;
                  let videourl = data.videourl;
                  let openinghours = data.openinghours;
                  let links = data.links;
  
                  let Lokationer = {
                      lokation: lokation,
                      videoUrl: videourl,
                      openingshours: openinghours,
                      links: links
                  };
  
                  console.log("Location objects are: ", Lokationer);
                  user_locations.push(Lokationer);
                  // location_obj.push(Lokationer);
  
              });                
          });
          return user_locations;
      }
  
  export default getAllDatabaseLocations;
  </code></pre>
  
  <p>This method always returns an empty array, even if the console inside the loop prints as i expected? How to use async and await property so as to return an array with all Lokationer objects inside on it.</p>