Complete the code to initialize Firebase in a web app.
const app = initializeApp({ apiKey: [1] });You need to provide your actual API key as a string to initialize Firebase.
Complete the code to get a Firestore database instance.
const db = get[1]();Firestore is the Firebase service for databases, so getFirestore() returns the database instance.
Fix the error in this Firebase Authentication code snippet.
const user = [1].currentUser;You should use the auth instance directly, not call firebase.auth() again if you already have auth.
Fill both blanks to correctly upload a file to Firebase Storage.
const storage = get[1](); const storageRef = ref(storage, [2]);
Use getStorage() to get the storage service, and the file path as a string without a leading slash.
Fill all three blanks to query Firestore documents where age is greater than 18.
const q = query(collection(db, [1]), where([2], [3], 18));
Query the "users" collection where the field "age" is greater than (">") 18.