回答編集履歴
1
ちょうせい
answer
CHANGED
@@ -12,4 +12,19 @@
|
|
12
12
|
}
|
13
13
|
}
|
14
14
|
new a;
|
15
|
+
```
|
16
|
+
ただ親子でもつ必要はないと思いますが・・・
|
17
|
+
```javascript
|
18
|
+
class a{
|
19
|
+
constructor(){
|
20
|
+
console.log(1);
|
21
|
+
new b;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
class b{
|
25
|
+
constructor(){
|
26
|
+
console.log(2);
|
27
|
+
}
|
28
|
+
}
|
29
|
+
new a;
|
15
30
|
```
|