The Code (Cont.): HTML

https://www.gstatic.com/firebasejs/10.14.1/firebase-database-compat.js
Differences between firebase-app.js amd firebase-database.js include:

firebase-app.js
This library provides the fundamental building blocks for interacting with Firebase services. It includes essential functionalities like:
  • initializing your Firebase project,
  • managing authentication, and
  • accessing other Firebase services.
You need to include this library in any web application that uses Firebase, regardless of the specific services you utilize.

firebase-database.js
This library provides the tools and APIs for interacting with the Firebase Realtime Database. You must specify your Realtime Database URL when initializing the JavaScript SDK.

https://www.gstatic.com/firebasejs/10.14.1/firebase-analytics-compat.js
It enables you to integrate Google Analytics for Firebase into your web applications. It allows you to collect data about user interactions and behaviors within your app, which can then be analyzed in the Firebase console to gain insights and improve your app’s performance.

onClick="addUser( ); return false;"
The result of button is shown at the paragraph <p id='result'>[result]</p>,” but the result quickly disappears after the form is submitted, or the button is clicked. According to Stack Overflow, it happens because the submit button actually does the action, but the page is being refreshed immediately. There are some ways to fix the problem, such as adding return false; to onClick handler.
<!DOCTYPE html>
<html lang="en">
 <head>
  <script src=
   "https://ajax.googleapis.com/ajax/libs/jquery/4.0.0/jquery.min.js">
  </script>
  <script src=
   "https://www.gstatic.com/firebasejs/10.14.1/firebase-app-compat.js">
  </script>
  <script src=
   "https://www.gstatic.com/firebasejs/10.14.1/firebase-database-compat.js">
  </script>
  <script src=
   "https://www.gstatic.com/firebasejs/10.14.1/firebase-analytics-compat.js">
  </script>
  <title>Managing Firebase data</title>
 </head>

 <body>
  <center>Managing Firebase Data</center>
  <form id="contact">
   ID: <input type="text" size="3" id="ID" value="1" />
   Name: <input type="text" size="30" id="name" value="Poke Mon" />
   Email: <input type="email" size="30" id="email" value="poke@example.com" />
   <p id="result">[result]</p>

   <button type="submit" onClick="addUser( ); return false;">Add a user
   </button>   (required: ID, name, email)

   <button type="submit" onClick="showUser( ); return false;">Show a user
   </button>   (required: ID)

   <button type="submit" onClick="showAll( ); return false;">Show all users
   </button>

   <button type="submit" onClick="deleteUser( ); return false;">Delete a user
   </button>   (required: ID)

   <button type="submit" onClick="deleteDB( ); return false;">Delete the database
   </button>

   <button type="submit" onClick="updateUser( ); return false;">Update a user
   </button>   (required: ID)

   <button type="reset">Reset</button>
  </form>





      Q: Why did the clock get kicked out of the classroom?    
      A: It tocked too much…