Discuss / JavaScript / ES6 终于干了回正事,这才是面向对象应有的样子

ES6 终于干了回正事,这才是面向对象应有的样子

Topic source

XNOKIA

#1 Created at ... [Delete] [Delete and Lock User]
class Cat extends Animal{
    constructor(name){
        super(name);
    }
    say() {
        return `Hello, ${this.name}!`
    }
}

  • 1

Reply