Solution suggestion:
Solution
const removeById = function(personId, done) {
Person.findByIdAndRemove(personId, function (err, data) {
if (err) return console.log(err);
done(null, data);
});
};
Make sure your export include the function
exports.removeById = removeById;
Challenge: Delete One Document Using model.findByIdAndRemove
Link to the challenge: