title: this.name is undefined in my Mongoose schema
body: <p>I'm having a problem. In my kittySchema Mongoose schema. Line 21. I'm trying to get this.name from within the schema object but I'm getting undefined.
  I know what the problem is. I'm using an arrow function and It's looking for the this.name property in the arrow function instead of the object that the arrow function is in. Is there a way around this instead of me using a regular vanilla js function?
  `</p>
  
  <pre><code>// Requiring Mongoose
  const mongoose = require("mongoose");
  
  const establishConnection = () =&gt; {
      // Establishing a connection to Mongoose
      mongoose.connect("mongodb://localhost/kittens");
  
      // Getting the Mongoose database from the pending connection
      const db = mongoose.connection;
  
      // Watching for Mongoose errors
      db.on("error", console.error.bind(console, "Connection error:"))
      // A connection was succesfully established
      db.once("open", () =&gt; {
          console.log("A connection was established");
          const kittySchema = mongoose.Schema({
              name: String
          });`enter code here`
          mongoose.
          kittySchema.methods.speak = () =&gt; {
              console.log(this.name ? `Meow, My name is ${this.name}.` : "I don't have a name.");
          }
          const Kitten = mongoose.model("Kitten", kittySchema);
          const silence = new Kitten({ name: "Silence" });
          console.log(`A new kitty named ${silence.name} was successfully added to your database!`);
          silence.speak();
      })
  }
  
  module.exports = {
      establishConnection
  }
  </code></pre>
  
  <p>`</p>