> For the complete documentation index, see [llms.txt](https://eleven-fifty-academy.gitbook.io/javascript-152-objects-arrays/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eleven-fifty-academy.gitbook.io/javascript-152-objects-arrays/05-arrays/array-basics/individual-elements-and-length.md).

# Individual Elements and Length

## Individual Elements

If we wanted to know exactly who the second employee in our list was we could run this code:

```javascript
var emp = ['Joe King', 'Amanda Huggenkiss', 'Justin Thyme'];
console.log(emp[1]);
```

Your console should have displayed `Amanda Huggenkiss`. Remember we use `emp[1]` because arrays are zero-indexed.

## Length

There's also a way to find out the **length** of our array:

```javascript
var emp = ['Joe King', 'Amanda Huggenkiss', 'Justin Thyme'];
console.log(emp['length']);
```

Our output is `3`. This is obviously because there are three elements in our array. You can also think of it as 3 is one more than the index of our final element. You could also write something like this:

```javascript
var emp = ['Joe King', 'Amanda Huggenkiss', 'Justin Thyme'];
emp.length = 2;
console.log(emp);
```

Which would output as `[ 'Joe King', 'Amanda Huggenkiss' ]`. This is because we set `emp.length` equal to 2, meaning we only wanted the first two elements in the array.
