MongoDB and Mongoose - Create a Model

Tell us what’s happening:

Hi!
Why is my test not passing?

This is my code:

const Schema = mongoose.Schema;

const personSchema = new Schema({
name: {type: String, required: true},
age: Number,
favoriteFood: [String]
});

const Person = mongoose.model(“Person”, personSchema);

Your project link(s)

solution: boilerplate-mongomongoose-3 - Node.js Repl - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 11; TECNO LC7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Mobile Safari/537.36

Challenge: MongoDB and Mongoose - Create a Model

Link to the challenge:

I found the issue :slightly_smiling_face:

The last property was favoriteFoods. I wrote favoriteFood.

Such a tiny detail.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.