From the course: Learning the JavaScript Language
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Manipulating arrays - JavaScript Tutorial
From the course: Learning the JavaScript Language
Manipulating arrays
- [Instructor] In this video, we're going to get into manipulating arrays, how we can see what's in an array, and how we can take action on the contents of that array. We'll be using this list of counties with just a few counties in it for demonstration purposes. If you haven't already pasted this into Node in the previous video, you can do so now. I already have it here. I'll just confirm that it has a value. If I want to get a specific item from an array, I need to retrieve it using the square braces notation we saw with objects. Although arrays are technically objects, the dot notation will not work, only square braces. So if I wanted to get the first item, I need to access it using the square braces notation and its key which is a number starting with zero. Always remember that arrays are what we call zero indexed. Each item in an array is assigned an index. Same as the key in an object, but with arrays we usually…
Contents
-
-
-
-
-
Objects4m 13s
-
(Locked)
Using objects for data modeling2m 33s
-
(Locked)
Manipulating objects4m 24s
-
(Locked)
Jargon: References4m 39s
-
(Locked)
Arrays5m 35s
-
(Locked)
Manipulating arrays7m 36s
-
(Locked)
Readability: Whitespace3m 24s
-
(Locked)
Readability: Comments4m 57s
-
(Locked)
Regular expressions6m 9s
-
-
-
-
-
-