In this challenge, there is already existed the variable Person, but they required that I need to create new variable Person. I try replace first variable by another name or comment this code but it don’t work. Help me plsss
Here is my code:
const Schema22 = mongoose.Schema;
const personSchema = new Schema22({
name: { type: String, required: true },
age: Number,
favoriteFoods: [String]
});
const Person = mongoose.model(‘Person’, personSchema);
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15
Challenge: MongoDB and Mongoose - Create a Model
Link to the challenge: