题解 | JS26 Getter

        class Rectangle {
            // 补全代码
            constructor(height,width){
                this.height = height,
                this.width = width
            }

            get area(){
                return this.height * this.width;
            }
        }
全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务