Skip to content

Commit 9fbdb2c

Browse files
Charlene TranCharlene Tran
Charlene Tran
authored and
Charlene Tran
committed
CT completed
1 parent 30608bd commit 9fbdb2c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

classes/chapter-examples-CT/ClassMethods.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,10 @@ class AstronautI {
2828
let fox = new AstronautI('Fox', 7, 12);
2929
let hippo = new AstronautO('Hippo', 25, 1000);
3030

31-
console.log(fox);
32-
console.log(hippo);
31+
console.log(fox); // Prints Object with the 'reportStats' method shows as an Anonymous function
32+
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

Comments
 (0)