class.txt 189 B

1234567891011
  1. class Car extends Vehicle {
  2. constructor(speed, cost) {
  3. super(speed);
  4. var c = Symbol('cost');
  5. this[c] = cost;
  6. this.intro = `This is a car runs at
  7. ${speed}.`;
  8. }
  9. }