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:
John
2023-02-28 17:45:47 +13:00
committed by GitHub
parent baee36ded4
commit fdabc2f66f

View File

@@ -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>.