Complete the code to delete a field named 'age' from a Firestore document.
docRef.update({ 'age': [1] })To delete a field in Firestore, you use FieldValue.delete().
Complete the code to delete the 'address' field from a Firestore document using the modular SDK.
updateDoc(docRef, { 'address': [1] })In the modular SDK, you import and use deleteField() to delete fields.
Fix the error in the code to delete the 'phone' field from a Firestore document.
docRef.update({ phone: [1] })The correct way to delete a field is to use FieldValue.delete() from the Firestore namespace.
Fill both blanks to delete the 'email' field using the modular Firestore SDK.
import { updateDoc, doc, [1] } from 'firebase/firestore'; await updateDoc(doc(db, 'users', userId), { 'email': [2] });
In modular SDK, you import deleteField and call it as deleteField() to delete a field.
Fill all three blanks to delete multiple fields 'city', 'state', and 'zip' in one update call using the modular SDK.
import { updateDoc, doc, [1] } from 'firebase/firestore'; await updateDoc(doc(db, 'locations', locationId), { 'city': [2], 'state': [3], 'zip': [3] });
Import deleteField and call it as deleteField() for each field to delete multiple fields in one update.