What is your hint or solution suggestion?
var removeById = function(personId, done) { Person.findByIdAndRemove (personId,(err, updatedDoc) => { if(err) return console.log(err); done(null, updatedDoc); }); };
Challenge: Delete One Document Using model.findByIdAndRemove
Link to the challenge:
Hey there,
do you have a specific question?
Hey, This is an solution, i was doing the challenge and them clicked on “hint” button… there was no solution or hint then when i’ve completed the challenge i’ve written this solution.