Create Many Records with model.create() help me

Create Many Records with model.create() help me

var model = mongoose.model;
var createManyPeople = function(arrayOfPeople, done) {
    model.create(arrayOfPeople, (err, data) => {
      if(err) {
    done(null, data);
``` why my code is not working please somebody help


Please provide some additional information to allow others to help you.

For example:

  • What does it means ‘not working’?
    Does it gives you an error? Does it saves just one document? Does it execute smoothly but it does not save anything?

  • Is that all the code you have? Is there a repository somewhere?

  • Where the code runs?
    A local environment? A glitch stuff?


A glitch stuff
this code not makin g any error but when I paste the URL in freecodecamp the challenge not pass


model.create(arrayOfPeople, (err, arrayOfPeople) =>