Skip to content

Commit

Permalink
Update code comment for mongoose sample query (mdn#29865)
Browse files Browse the repository at this point in the history
* Update code comment for mongoose sample query

The current description of the query example isn't the most straightforward or clear for someone coming from an SQL background. Having an alternative explanation helps with comprehension of the query.

* Update files/en-us/learn/server-side/express_nodejs/mongoose/index.md

---------

Co-authored-by: Hamish Willee <[email protected]>
  • Loading branch information
cwangsanata and hamishwillee authored Oct 29, 2023
1 parent 1241fa7 commit 8463834
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ You can search for records using query methods, specifying the query conditions
```js
const Athlete = mongoose.model("Athlete", yourSchema);

// find all athletes who play tennis, selecting the 'name' and 'age' fields
// find all athletes who play tennis, returning the 'name' and 'age' fields
const tennisPlayers = await Athlete.find(
{ sport: "Tennis" },
"name age",
Expand Down

0 comments on commit 8463834

Please sign in to comment.