1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
class Vehicle {}
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}.`;
}
join() {
}
other(a = ( ( 3 + 2 ) ) ) {
console.log(a)
}
something(a = ( ( 3 + 2 ) ), b = 1 ) {
console.log(a)
}
onemore(a=(3+2, b=(5*9))) {}
}
// these should not be matched as class functions
for(expr; expr; expr) {}
while(value) {}
if(value) {}
switch(value) {}
try {} catch(err) {}
|