title: Get value from Cloud Firebase and show element depends of if/else statement
body: <p>I am trying to get value from Cloud Firebase database and use if/else statement to show or hide some div elements, depends of that value. My database works fine, I can save, read and delate data but I can't find solution where I should use this conditional logic. Can I do that with this code, can anyone write me where is a problem, why this doesn't work?</p>
  
  <pre><code>firebase.initializeApp(config);
  const db = firebase.firestore();
  
  db.collection('ringnum').get().then((snapshot) =&gt; {
      snapshot.docs.forEach(doc =&gt; {
          renderRingNumbers(doc);
      })
  })
  
  db.collection('ringnum').get().then((snapshot) =&gt; {
      if (snapshot=='1'){
          document.getElementById('ring').style.display='block';
          document.getElementById('ring2').style.display='none';
      }else if (snapshot=='2'){
          document.getElementById('ring').style.display='block';
          document.getElementById('ring2').style.display='block';
      }
  })
  </code></pre>