Complete the code to create a batch write instance.
const batch = [1](db);The writeBatch() method creates a new batch write instance in Firebase.
Complete the code to add a set operation to the batch.
batch.[1](docRef, { name: 'Alice' });
The set() method adds a set operation to the batch to write data to a document.
Fix the error in the code to commit the batch.
await batch.[1]();The commit() method sends all the batch operations to Firestore.
Fill both blanks to add a delete operation and then commit the batch.
batch.[1](docRef); await batch.[2]();
Use delete() to add a delete operation and commit() to send the batch.
Fill all three blanks to update a document, add a set operation, and commit the batch.
batch.[1](docRef, { age: 30 }); batch.[2](docRef2, { name: 'Bob' }); await batch.[3]();
Use update() to change fields, set() to write data, and commit() to send the batch.
