> For the complete documentation index, see [llms.txt](https://ayou09110.gitbook.io/javascript-jquery/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayou09110.gitbook.io/javascript-jquery/undefined-2/undefined-8.md).

# 클래스

#### 클래스 상속

```java
class Box1 {
    constructor(name, active){
        this.name = name;
        this.active = active;
    }
    study(){
        document.write(this.name+"가"+this.active+"되었습니다.");
    }
}
class Box2 extends Box1 {
    constructor(name, active, today){
        super(name, active);
        this.today = today;
    }
    study2(){
        document.write(this.today + this.name+"가"+this.active+"되었습니다.");
    }
}
const result4 = new Box1("함수9","실행");
const result5 = new Box2("함수10","실행","오늘도");
result4.study();
result5.study();
result5.study2();
```
