Complete the code to get a reference to a collection named 'users'.
const usersRef = db.collection('[1]');
The collection name must be exactly 'users' to reference the correct collection.
Complete the code to get a document with ID 'abc123' from the 'users' collection.
const docRef = db.collection('users').[1]('abc123');
The doc method is used to reference a specific document by its ID.
Fix the error in the code to add a new document to the 'users' collection with data.
db.collection('users').[1]({ name: 'Alice', age: 30 });
The add method creates a new document with an auto-generated ID and saves the data.
Fill both blanks to create a document reference and set data for it.
const docRef = db.collection('[1]').[2]('user1'); docRef.set({ active: true });
First, reference the 'users' collection, then get the document with ID 'user1' using doc.
Fill all three blanks to query documents where 'age' is greater than 25 in 'users' collection.
const queryRef = db.collection('[1]').where('[2]', '[3]', 25);
Query the 'users' collection where the field 'age' is greater than 25 using the 'where' method.