摘要:
1 function Car(model, year, miles) { 2 this.model = model; 3 this.year = year; 4 this.miles = miles; 5 } 6 7 Car.prototype.toString = function() { 8 return this.model + " has done " + this.miles + " miles"; 9 };10 11 var civic = new Car("Honda Civic", 2009, 20000);12 va 阅读全文