text: const _ = require("lodash");
  
  console.log(`Demo of prototypical inheritance`);
  // https://www.w3schools.com/js/tryit.asp?filename=tryjs_object_prototype5
  // Think of the function as something that instantiates on object
  function MyParticulars() {
    this.name = "Yih Foo";
    this.age = "29";
  }
  MyParticulars.prototype.nationality = "Malaysian";
  
  // Now instantiate it
  const getParticulars = new MyParticulars();
  
  console.log(
    `myParticulars: ${getParticulars.name}. ${getParticulars.age}. ${getParticulars.nationality}`
  );
  
  // https://www.crockford.com/javascript/prototypal.html
  console.log(`Another demo of prototypical inheritance`);
  const oldObject = { a: "1", b: "2" };
  // Bind Object.create() to a function
  if (typeof Object.create !== "function") {
    Object.create = function (obj) {
      function F() {}
      F.prototype = obj;
      return new F();
    };
  }
  const newObject = Object.create(oldObject);
  console.log(newObject); // {}. Odd how I cannot see a:1 and b:2 here... Oh, because newObject references oldObject, but does not store oldObject!
  console.log(newObject.a); // 1, fron newObject referencing oldObject
  console.log(newObject.b); // 2
  
  console.log(`Demo of classical inheritance`);
  // Since prototypes can imitate class, this is done in JS using the Class syntax
  // The trick here is to think of each new inheritance as a new layer of abstraction
  // https://www.w3schools.com/js/js_class_inheritance.asp
  class Name {
    constructor(name) {
      // Contructor inherits "name" from Person
      this.name = name;
    }
    printName() {
      // Notice how I need to add "this" to set the context of name to that
      // of the constructor's declaration
      return `This person's name is ${this.name}`;
    }
  }
  // "extends" here allows Person to access the methods in Name
  class Person extends Name {
    constructor(person, name) {
      super(name); //Calls the parent's (Person) constructor function
      this.person = person;
    }
    printPerson() {
      // Notice I can call a method from Name here
      return `This is a person: ${this.person}. ${this.printName()}`;
    }
  }
  
  const aboutThisPerson = new Person("Some dude", "Yih Foo");
  console.log(aboutThisPerson);
  console.log(aboutThisPerson.printPerson());
  