Open this example in the interactive library
Source code
class Label {
text() {
return "draft";
}
}
class TaggedLabel extends Label {
text() {
return "[" + super.text() + "]";
}
}
console.log(new TaggedLabel().text());
Sample output
[draft]
