Appearance
本节目标:理解“类的属性”的核心思路,并能把它用于实际开发或面试表达。
类的属性名,可以采用表达式。 let methodName = 'getArea'; class Square { constructor(length) { // ... } [methodName]() { // ... }}
本站总访问 — 次