题解 | #Getter#

Getter

http://www.nowcoder.com/practice/e7f3a2f429d945e49f5b48ef1065beda

{"css":"","js":"","html":"<!DOCTYPE html>\n<html>\n    <head>\n        <meta charset=utf-8>\n    </head>\n    <body>\n    \t\n        <script type=\"text/javascript\">\n            class Rectangle {\n                // 补全代码\n                 constructor(height, width) {\n        this.height = height\n        this.width = width\n\n      }\n      get area () {\n        return this.width * this.height\n      }\n            }\n        </script>\n    </body>\n</html>","libs":[]}
全部评论

相关推荐

醉蟀:你是我今年见过的最美牛客女孩
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
1
1
分享

创作者周榜

更多
牛客网
牛客企业服务