File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
source/fundamentals/crud/read-operations Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -78,24 +78,23 @@ For more information on the ``options`` settings for the ``find()``
7878method, see the
7979:node-api:`API documentation on find() <Collection.html#find>`.
8080
81- To see the next three longest books, append the ``skip()`` method, passing
82- the number of documents to skim over to the previous code snippet's call to
83- ``find()``:
81+ To see the next three books in the results, append the ``skip()`` method,
82+ passing the number of documents to bypass as shown below:
8483
8584.. code-block:: javascript
86- :emphasize-lines: 4
85+ :emphasize-lines: 6,7
8786
8887 // define an empty query document
8988 const query = {};
90- // sort in ascending ( 1) order by length
91- const sort = { length: 1 };
89+ // sort in descending (- 1) order by length
90+ const sort = { length: - 1 };
9291 const limit = 3;
9392 const skip = 3;
9493 const cursor = collection.find(query).sort(sort).limit(limit).skip(skip);
9594 await cursor.forEach(console.dir);
9695
9796This operation returns the documents that describe the fourth through sixth
98- longest books :
97+ books in order of longest-to-shortest length :
9998
10099.. code-block:: javascript
101100
You can’t perform that action at this time.
0 commit comments