diff --git a/docs/50-counting-sorting/10-sorting.mdx b/docs/50-counting-sorting/10-sorting.mdx index 8438787..52310a5 100644 --- a/docs/50-counting-sorting/10-sorting.mdx +++ b/docs/50-counting-sorting/10-sorting.mdx @@ -2,7 +2,7 @@ We can sort our results using the `$sort` stage. We need to sort on a field, being 1 ascending and -1 descending order. -👐 Let's get all books from 1984, sorted by number of pages. We'll only show the title, pages and authors. +👐 Let's get all books from 1984, sorted by number of pages. We'll only show the title, pages, and authors. ```js let booksFrom1984 = {$match: {year: 1984}}; @@ -16,7 +16,7 @@ db.books.aggregate([ ]); ``` -As we can see, books with no `pages` info appear first. These documents don't have that information, hence `pages` is `null` and gets sorted as less than any number. +As we can see, books with no `pages` info appear first. These documents don't have that information. Hence, `pages` is `null` and gets sorted as less than any number. 👐 We can sort the other way around: @@ -52,4 +52,4 @@ db.books.aggregate([ ]); ``` - \ No newline at end of file +