mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 19:52:21 +03:00
790a262c07
swc_babel_ast: - Rename as `swc_estree_ast`. swc_babel_compat: - Rename as `swc_estree_compat`. swc_babel_visit: - Rename as `swc_estree_visit`.
20 lines
292 B
JavaScript
20 lines
292 B
JavaScript
class Animal {
|
|
constructor(name) {
|
|
this.name = name;
|
|
}
|
|
|
|
speak() {
|
|
console.log(`${this.name} makes a noise.`);
|
|
}
|
|
}
|
|
|
|
class Dog extends Animal {
|
|
constructor(name) {
|
|
super(name);
|
|
}
|
|
|
|
speak() {
|
|
console.log(`${this.name} barks.`);
|
|
}
|
|
}
|