File tree
Expand file treeCollapse file tree1 file changed
+5
-1
lines changed Expand file treeCollapse file tree1 file changed
+5
-1
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -1202,6 +1202,10 @@ class Square extends Shape {
|
1202 | 1202 | setLength(length) {
|
1203 | 1203 | this.length = length;
|
1204 | 1204 | }
|
| 1205 | + |
| 1206 | +getArea() { |
| 1207 | +return this.length * this.length; |
| 1208 | +} |
1205 | 1209 | }
|
1206 | 1210 |
|
1207 | 1211 | function renderLargeShapes(shapes) {
|
@@ -1220,7 +1224,7 @@ function renderLargeShapes(shapes) {
|
1220 | 1224 | }
|
1221 | 1225 |
|
1222 | 1226 | let shapes = [new Rectangle(), new Rectangle(), new Square()];
|
1223 |
| -renderLargeShapes(); |
| 1227 | +renderLargeShapes(shapes); |
1224 | 1228 | ```
|
1225 | 1229 | **[⬆ back to top](#table-of-contents)**
|
1226 | 1230 |
|
|
You can’t perform that action at this time.
0 commit comments