presentations/highlight-js/test/markup/javascript/class.txt

12 lines
189 B
Text
Raw Normal View History

2018-12-07 08:48:05 -06:00
class Car extends Vehicle {
constructor(speed, cost) {
super(speed);
var c = Symbol('cost');
this[c] = cost;
this.intro = `This is a car runs at
${speed}.`;
}
}