Hi
I am performing a task Model.remove() attaching my code below. In console its returning a JSON with deleted count but its not accepting my code.
Please Guide!!!
const removeManyPeople = (done) => {
const nameToRemove = “Mary”;
Person.remove({name: nameToRemove}, (err, deletedData) => {
if(err) return console.log(err);
done(null, deletedData);
})
};
Your project link(s)
solution: https://replit.com/@muhammadadeel9/boilerplate-mongomongoose
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.88 Safari/537.36
Challenge: Delete Many Documents with model.remove()
Link to the challenge: