Complete the code to insert a single document into the collection.
db.users.[1]({ name: "Alice", age: 30 })
The insertOne method adds a single document to the collection.
Complete the code to insert multiple documents at once.
db.orders.[1]([{ item: "book", qty: 3 }, { item: "pen", qty: 10 }])
The insertMany method adds multiple documents in one operation.
Fix the error in the insert operation to add a document correctly.
db.products.insertOne({ name: "Laptop", price: [1] })The price should be a number, not a string, to store it correctly.
Fill both blanks to insert a document with a nested address field.
db.customers.insertOne({ name: "Bob", address: { city: [1], zip: [2] } })The city should be a string and zip a number to represent the address correctly.
Fill all three blanks to insert a document with a date and status.
db.tasks.insertOne({ title: [1], dueDate: new Date([2]), status: [3] })The title and status are strings, and the date is passed as a string to the Date constructor.
