I currently have this function:
<script>
        function firebase_database(){
          var docRef = firebase.collection("signs").doc("PuA9s68iuxBnJo7PEezC");
          docRef.get().then(function(doc) {
              if (doc.exists) {
                  console.log("Document data:", doc.data());
              } else {
                  // doc.data() will be undefined in this case
                  console.log("No such document!");
              }
          }).catch(function(error) {
              console.log("Error getting document:", error);
          });
        }
        </script>
and I tried calling it with
<script> firebase_database() </script>  
but I get this
(index):823 Uncaught TypeError: firebase.collection is not a function
    at firebase_database ((index):823)
    at (index):836
SN: First time working with JS
 
     
     
     
     
     
     
     
    