Complete the code to find all documents in the collection.
db.collection.[1]()The find() method retrieves all documents from a MongoDB collection.
Complete the code to insert a new document into the collection.
db.collection.[1]({ name: 'Alice', age: 30 })
The insertOne() method adds a single new document to the collection.
Fix the error in the query to update a document's age.
db.collection.updateOne({ name: 'Alice' }, { [1]: { age: 31 } })The $set operator updates the value of a field in a document.
Fill both blanks to find documents where age is greater than 25.
db.collection.find({ age: { [1]: [2] } })The $gt operator means 'greater than'. We want ages greater than 25.
Fill all three blanks to delete documents where status is 'inactive' and age is less than 20.
db.collection.deleteMany({ status: [1], age: { [2]: [3] } })We delete documents where status is 'inactive' and age is less than 20 using $lt.
