摘要:
引用 李松峰 老师的PPT 1 var Person = function(living, age, gender) { 2 this.living = living; 3 this.age = age; 4 this.gender = gender; 5 }; 6 7 Person.prototype.getGender = function(){ 8 return this.gender; 9 };10 11 var child = new Person(true, 25, 'male');12 13 console.log (child.getGender()); ... 阅读全文