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 JavaScript Arrays!
You have completed JavaScript Arrays!
Preview
To access an element within an array, you use an "index" value, which is a number that indicates a position in the array.
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
the variable's name is a placeholder for
the value assigned to it.
0:00
For example, if you wanted to display
the contents of a variable named status in
0:00
the console, you'd provide the console.log
method of the variable name.
0:04
However, the name of an array doesn't
quite represent a single value.
0:07
It's a list of multiple values, or as
they are formally called array elements.
0:12
To access a single element within
an array, you use what's called an index
0:17
value, which is a number that indicates
the position of an element in an array.
0:21
You can think of an array
as a numbered list.
0:26
To get an item in the list,
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