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 Practice Object Basics in JavaScript!
You have completed Practice Object Basics in JavaScript!
Preview
Solution video for calling a method code challenge.
This video doesn't have any notes.
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
set it to the return value
from the countWords method.
0:00
Let's declare the variable.
0:02
I'll call it numWords, but
any variable name would work.
0:04
Now, if you recall, to access a property
on an object or to call one of its methods
0:11
using dot notation, you write the name of
the object, which in our case is myString,
0:15
because that's the variable
that the object is stored in,
0:20
followed by a dot, followed by
the name of the property or method.
0:23
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