質問編集履歴

1

解決後の補足情報

2018/04/09 05:31

投稿

murabito
murabito

スコア108

test CHANGED
File without changes
test CHANGED
@@ -97,3 +97,63 @@
97
97
  ## Chrome
98
98
 
99
99
  ![イメージ説明](0ab4137e78ef4c7f814008c539ef7ab4.png)
100
+
101
+
102
+
103
+ # ★ 解決後の補足
104
+
105
+
106
+
107
+ 以下の場合、どちらも出力結果はChromeコンソール上で`{constructor: ƒ}`となりました。
108
+
109
+
110
+
111
+ ```
112
+
113
+ 'use strict';
114
+
115
+
116
+
117
+ class Child1 {
118
+
119
+ constructor(x){
120
+
121
+ this.x = x;
122
+
123
+ }
124
+
125
+ }
126
+
127
+
128
+
129
+ const child1 = new Child1(5);
130
+
131
+
132
+
133
+ console.log(Object.getPrototypeOf(child1));
134
+
135
+
136
+
137
+
138
+
139
+ class Child2 extends function(){} {
140
+
141
+ constructor(x){
142
+
143
+ super();
144
+
145
+ this.x = x;
146
+
147
+ }
148
+
149
+ }
150
+
151
+
152
+
153
+ const child2 = new Child2(5);
154
+
155
+
156
+
157
+ console.log(Object.getPrototypeOf(child2));
158
+
159
+ ```