JavaScript
Result
Run
License
class Parent { #parentName = "papa"; getParentName() { return this.parentName + ' from Parent'; } } class Child extends Parent { parentName = `${this.parentName}의 자식 tom`; } const child = new Child(); console.log(child.parentName); console.log(child.getParentName());
Console
expand_less
License
License
by DevDic
Close