Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Object-Oriented JavaScript!
You have completed Object-Oriented JavaScript!
Preview
Add logic in addition to setting property values via setter methods.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
A setter method, on the other hand,
receives a value and
0:00
can perform logic on
that value if need be.
0:03
Then it either updates an existing
property with that value or
0:05
stores the value to a new property.
0:09
This is pretty confusing and
complicated at first.
0:12
Don't worry if you're having trouble.
0:14
This is tough stuff and it can take
awhile for new concepts to sink in.
0:16
When I'm learning a new concept, I spend
a lot of time practicing the code and
0:20
reading about the topic online.
0:23
I found that being exposed to a topic
from many different perspectives and
0:25
angles helps me understand
things more deeply.
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up