At this challenge, my solution is not getting accepted. Not sure how the expected output looks like. Please suggest if I have missed anything for this challenge.
Code :
var Person = mongoose.model('Person', PersonSchema);
var person = new Person({
name: 'Alex',
age: 26,
favoriteFoods: ['Donut'],
dateOfBirth: '01/01/1995'
});
person.save((err, Person) => {
if(err){
console.log("There is an error");
} else {
console.log(person);
}
});
I verified that the data is populated correctly in the db.
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.