I am navigating an object that contains an array of objects.

When I use chrome's js developer console I can grab the title property from the first item in the array i.e.

```
hello.example.array[0].title

```

this returns the title (only in the js developer console). However when I write a script to do this for me suddenly I receive this response:

```
Cannot read property 'array' of undefined

```

here is an example of my js

```
var theTitle = hello.example.array[0].title;
console.log(theTitle);

```

**Why does the console find it correctly when my js does not?**