题解 | #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":[]}