Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Nicholas Wallen12,278 Points
Why use: console.log(this.sound);?
Not sure what the purpose of adding this was.
If you delete that line from the speak() method, it does the same thing.
steven but what is the purpose of the method itself it doesn't make sense we still can use the sound in the constructor without any method
Steven Parker229,005 Points
The "console.log" is what causes the "sound" message to appear on the console.
If the message was shown after you deleted the line, you probably forgot to save your change in the editor (with the menu or Ctrl-S shortcut) before re-running the program.