We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30608bd commit 9fbdb2cCopy full SHA for 9fbdb2c
classes/chapter-examples-CT/ClassMethods.js
@@ -28,5 +28,10 @@ class AstronautI {
28
let fox = new AstronautI('Fox', 7, 12);
29
let hippo = new AstronautO('Hippo', 25, 1000);
30
31
- console.log(fox);
32
- console.log(hippo);
+ console.log(fox); // Prints Object with the 'reportStats' method shows as an Anonymous function
+ console.log(hippo); // ONLY prints the Object properties WITHOUT the method due to being outside of 'constructor'
33
+
34
35
+console.log(fox.reportStats());
36
+console.log(hippo.reportStats());
37
0 commit comments