function initializeDatabase(){

  console.log("Initializing Database");

  firebase.initializeApp(configObj);
  firebase.analytics();

  firebase.auth().signInAnonymously().catch(function (error) {
    var errorCode = error.code;
    var errorMessage = error.message;
  });

  firebase.auth().onAuthStateChanged(function (user) {
    if (user) {
      // User is signed in.
      var isAnonymous = user.isAnonymous;
      var uid = user.uid;
    } else {
      // User is signed out.
    }
  });

  console.log("Database Successfully Initialized!");
  databaseQuery();
  loginBtn.innerHTML = "Log In";
  loginBtn.onclick = function(){
    login();
  };
  signUpFld.onclick = function(){
    signUp();
  }
}
//and the buttons will become operational.
and the buttons will become operational.
and the buttons will become operational .
function initializeDatabase(){
  console.log("Initializing Database");
  firebase.initializeApp(configObj);
  firebase.analytics();
  firebase.auth().signInAnonymously().catch(function (error) {
    var errorCode = error.code;
    var errorMessage = error.message;
  });
  firebase.auth().onAuthStateChanged(function (user) {
    if (user) {
      var isAnonymous = user.isAnonymous;
      var uid = user.uid;
    } else {
    }
  });
  console.log("Database Successfully Initialized!");
  databaseQuery();
  loginBtn.innerHTML = "Log In";
  loginBtn.onclick = function(){
    login();
  };
  signUpFld.onclick = function(){
    signUp();
  }
}
function initializeDatabase ( ) { console . log ( "Initializing Database" ) ; firebase . initializeApp ( configObj ) ; firebase . analytics ( ) ; firebase . auth ( ) . signInAnonymously ( ) . catch ( function ( error ) { var errorCode = error . code ; var errorMessage = error . message ; } ) ; firebase . auth ( ) . onAuthStateChanged ( function ( user ) { if ( user ) { var isAnonymous = user . isAnonymous ; var uid = user . uid ; } else { } } ) ; console . log ( "Database Successfully Initialized!" ) ; databaseQuery ( ) ; loginBtn . innerHTML = "Log In" ; loginBtn . onclick = function ( ) { login ( ) ; } ; signUpFld . onclick = function ( ) { signUp ( ) ; } }
and the buttons will become operational.
and the buttons will become operational .
// User is signed in. // User is signed out.