title: Create and Save a Record of a Model on MongoDB
body: <p>I am currently on the MongoDB and Mongoose section of FreeCodeCamp. </p>
  
  <p>The <a href="https://beta.freecodecamp.org/en/challenges/mongodb-and-mongoose/create-and-save-a-record-of-a-model" rel="nofollow noreferrer">exercise</a> requires the user to create a document instance using the Person constructor you build before. Pass to the constructor an object having the fields name, age, and favoriteFoods. Their types must be conformant to the ones in the Person Schema. Then call the method document.save() on the returned document instance. Pass to it a callback using the Node convention.</p>
  
  <p>I have created the person schema and constructor but I am not too sure about what is still missing and how to piece it all together to implement the solution. Can someone help clarify?</p>
  
  <pre><code>var mongoose = require("mongoose");
  mongoose.connect(process.env.MONGO_URI);
  
  var Schema = mongoose.Schema;
  
  var personSchema = new Schema({
    name:  {
      type: String,
      required: true
    },
    age: Number,
    favoriteFoods:   [String]
  });
  
  var Person = mongoose.model('Person', personSchema);
  
  var joe = new Person({
    name: "Joe",
    age: 24,
    favoriteFoods: ['Apple', 'Banana']
  });
  
  joe.save(function(err, persons) {
    if(err){
      console.log("Failed");
    } else {
      console.log("Saved Successful");
      console.log(persons);
    }
  });
  
  var createAndSavePerson = function(done) {
  
    done(null /*, data*/);
  
  };
  </code></pre>