title: Facing error while implementing Firebase in JavaScript project
body: <p>I'm getting below error for firebase implementing in a javascript project, add data in firebase.
  is it possible to use firebase in a pure javascript project?</p>
  <pre><code>(anonymous) @ fire.js:18
  fire.js:26 Uncaught **ReferenceError: database is not defined**
      at myFunction (fire.js:26)
  </code></pre>
  <p>HTML code:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
  </code></pre>
  
  <pre><code>&lt;script src=&quot;https://www.gstatic.com/firebasejs/7.16.1/firebase-app.js&quot;&gt;&lt;/script&gt;
  
  &lt;!-- TODO: Add SDKs for Firebase products that you want to use
       https://firebase.google.com/docs/web/setup#available-libraries --&gt;
  &lt;script src=&quot;https://www.gstatic.com/firebasejs/7.16.1/firebase-analytics.js&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;./fire.js&quot;&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
      Name: &lt;input type=&quot;text&quot; name=&quot;&quot; id=&quot;data1&quot;&gt;
      &lt;button onclick=&quot;myFunction()&quot;&gt;Click me&lt;/button&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>js code :</p>
  <pre><code>var firebaseConfig = {
      apiKey: &quot;************&quot;,
      authDomain: &quot;************&quot;,
      databaseURL: &quot;************&quot;,
      projectId: &quot;************&quot;,
      storageBucket: &quot;************&quot;,
      messagingSenderId: &quot;************&quot;,
      appId: &quot;************&quot;,
      measurementId: &quot;************&quot;
  };
  
  // Initialize Firebase
  firebase.initializeApp(firebaseConfig);
  firebase.analytics();
  
  
  function myFunction() {
      var today = new Date();
      var timeStamp = today.getHours() + &quot;:&quot; + today.getMinutes() + &quot;:&quot; + today.getSeconds() + &quot; &quot; + today.getDate() + &quot;/&quot; + today.getMonth() + &quot;/&quot; + today.getFullYear();
  
      const dbConn = firebase.database().ref();
      var myData = dbConn.child(&quot;myData&quot;);
  
      var curr = document.getElementById(&quot;data1&quot;);
  
      myData.push({ Data: parseInt(curr.value), Time: timeStamp });
  }
  </code></pre>
  <p>can someone guide me to solve these issue,
  Thanks in advance.</p>