Perform Classic Updates by Running Find, Edit, then Save 1

Tell us what’s happening:
Describe your issue in detail here.

Your project link(s)

solution: https://replit.com/@veliyevyasin/boilerplate-mongomongoose-1

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0

Challenge: Perform Classic Updates by Running Find, Edit, then Save

Link to the challenge:

const findEditThenSave = (personId, done) => {
 const foodToAdd = "hamburger";
 Person.findByIdAndUpdate(personId, {"$push":{favoriteFoods:foodToAdd}},{new: true},(err,data)=>callback(err,data,done))

Why is it not pass

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.