title: How to treat a firebase ref in case of loops in javascript?
body: <p>So I am working on a loop
  and I am wondering whats the recommended way to deal with situations where you are looping through a bunch of firebase storage items and you are going to use bunch of firebase child refs. I am using Node.js 12.18.2 and I am writing function for firebase cloud functions and I am going to loop through a bunch of files stored inside firebase storage and I wanna keep variable hoisting in mind while writing the code.</p>
  <pre><code>//should I put the ref here? and ofc, which one is better to use var or let?
  let storageRef = firebase.storage();
  var storageRef = firebase.storage();
  
  item.forEach(element =&gt; {
  // or use seperate storage ref for each firebase storage item
  let storageRef = firebase.storage();
  var storageRef = firebase.storage();
  
  let storageRef.child(&quot;images/stars.jpg&quot;).getDownloadURL(); //bla bla bla
  });
  </code></pre>
  <p>basically don't want the storage ref to somehow collide with each other. what's the best option?</p>