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: 'Bob' }, { [1]: { age: 35 } })The $set operator updates specific fields in a document.
Fill both blanks to create a query that finds documents where age is greater than 25.
db.collection.find({ age: { [1]: [2] } })The $gt operator means 'greater than'. So this finds documents with age > 25.
Fill all three blanks to create a query that finds documents with name 'Eve' and age less than 40.
db.collection.find({ name: [1], age: { [2]: [3] } })This query finds documents where name is 'Eve' and age is less than 40 using $lt.
