原型链-初步认识

function Person(name) {
  this.name = name;
}

Person.prototype.sayHello = function() {
  console.log('Hello, ' + this.name);
};

const person1 = new Person('Alice');
person1.sayHello();  // 输出: Hello, Alice