Question on the School Catalogue Project in the JS Classes Lesson

Hi there,

General question on something that came up in the School Catalogue project ( in the JS Classes lesson.

The project asks you to call two different methods to get information:




I’m confused as to why one would include the “( )” and one would not. Is it because one is calling a method on the class vs the subclass? Or because one is calling a getter method and those are handled differently?

Thanks in advance for the help!


Seems you answered your own question?

Getters and setters allow us to change the behavior of a property, so they have the same syntax as a property (alSmith.sportsTeams) or in general terms:

Thanks for the information. That helps!