Solution to Find, Edit and SAVE with mongoose

var findEditThenSave = function(personId, done) {
  var foodToAdd = 'hamburger';

  Person.findById({_id: personId}) 
  .then(function(person) {
    person.favoriteFoods.push(foodToAdd);, people) {
    if(err) return console.log(err);
  done(null, people);


Link to the challenge:

Hello there.

What worked for me on these challenges, when I got stuck was to clear my database, go to the first lesson, and resubmit the link, going through each lesson concurrently.

Hope this helps

1 Like

Thank you for the advise. I actually do it now when I encounter some weird errors.