面向对象编程 JavaScript不区分类和实例的概念,而是通过原型(prototype)来实现的。 let Student = { name: "robot", height: 1.2, run: function () { console.log(this.name + "is running"); } }; let s1 = { name: "小米" }; //原型链,所有对象都是实例 s1.__proto__=Student; console.log(s1.name)...