mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-16 01:01:16 -04:00
fix(cirriculum): reword exercise instructions to clarify required schema (#49542)
* change wording to highlight the required fields and its corresponding types.
This commit is contained in:
@@ -28,15 +28,11 @@ const someFunc = function(done) {
|
||||
|
||||
# --instructions--
|
||||
|
||||
Create a person schema called `personSchema` having this prototype:
|
||||
Create a person schema called `personSchema` with the following shape:
|
||||
|
||||
```markup
|
||||
- Person Prototype -
|
||||
--------------------
|
||||
name : string [required]
|
||||
age : number
|
||||
favoriteFoods : array of strings (*)
|
||||
```
|
||||
* A required `name` field of type `String`
|
||||
* An `age` field of type `Number`
|
||||
* A `favouriteFoods` field of type `[String]`
|
||||
|
||||
Use the Mongoose basic schema types. If you want you can also add more fields, use simple validators like required or unique, and set default values. See our <a href="https://www.freecodecamp.org/news/introduction-to-mongoose-for-mongodb-d2a7aa593c57/" target="_blank" rel="noopener noreferrer nofollow">Mongoose article</a>.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user