Problem with Create and Save a Record of a Model challenge

Hello, i’ve been trying to go through this challenge “MongoDB and Mongoose - Create and Save a Record of a Model”, I think I have everything done right but the challenge doesn’t pass, here’s my code on glitch, any assistance would be much appreciated.

Challenge Link


That’s because when you create an instance of your model:

new Person(...)

You should pass an object, not the values directly:

new Person({ name: "The name", age: NN, favoriteFoods: []. })
1 Like

Thanks it worked, got too used to java :stuck_out_tongue:

1 Like