const Person = mongoose.model(“Person”, personSchema);
const createAndSavePerson = (done) => {
const person = new Person({
name: “Sona”,
age: 12,
favoriteFoods: [“Chicken Noodles”, “Fruits”]
});
person.save(function(err, data) {
return console.log(err)
done(null, data);
});
// when i run my console shows me “SyntaxError: Unexpected end of input” now i don’t know what to do anymore please someone can help please
When posting code on the forum, please insert it inside backticks to make it easier to read. You can click on the </> icon (or CTRL+e) and paste the code where indicated.
Also, could you share a link to the challenge you’re working on and also to your full code please?