Complete the code to skip the first 5 documents in the collection.
db.collection.find().[1](5)
The skip method is used to skip a number of documents in the result set. Here, skip(5) skips the first 5 documents.
Complete the code to skip 10 documents and limit the result to 5 documents.
db.collection.find().skip(10).[1](5)
After skipping 10 documents, limit(5) restricts the output to 5 documents.
Fix the error in the code to skip 3 documents correctly.
db.collection.find().[1](3)
The skip method requires parentheses with the number inside: skip(3).
Fill both blanks to skip 7 documents and sort by 'age' ascending.
db.collection.find().[1](7).[2]({ age: 1 })
First, skip(7) skips 7 documents. Then, sort({ age: 1 }) sorts the remaining documents by age in ascending order.
Fill all three blanks to skip 4 documents, limit to 3 documents, and sort by 'name' descending.
db.collection.find().[1](4).[2](3).[3]({ name: -1 })
The methods are chained: skip(4) skips 4 documents, limit(3) limits the result to 3 documents, and sort({ name: -1 }) sorts by name descending.