> For the complete documentation index, see [llms.txt](https://node-girls.gitbook.io/beginners-javascript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://node-girls.gitbook.io/beginners-javascript/challenges/challenge-2-famous-writers.md).

# Challenge 2: Famous Writers

Did you know you can also have an array of objects? We've created one for you here. Loop through the array, and for each object, `console.log()` the following sentence:

```javascript
"Hi, my name is {firstName} {lastName}. I am {age} years old, and work as a {occupation}."
```

Ignore the brackets. They're just there to let you know a word should be replaced with something else. The sentence you log should look like this:

```javascript
"Hi, my name is Virginia Woolf. I am 59 years old, and work as a writer."
```

Here is the array:

```javascript
var writers = [
  {
    firstName: "Virginia",
    lastName: "Woolf",
    occupation: "writer",
    age: 59,
    alive: false
  },
  {
    firstName: "Zadie",
    lastName: "Smith",
    occupation: "writer",
    age: 41,
    alive: true
  },
  {
    firstName: "Jane",
    lastName: "Austen",
    occupation: "writer",
    age: 41,
    alive: false
  },
  {
    firstName: "bell",
    lastName: "hooks",
    occupation: "writer",
    age: 64,
    alive: true
  },
];
```

If you want an extra challenge, only `console.log()` the writers that are alive.[<br>](https://node-girls.gitbook.io/tutorials/~/drafts/-LHS9Z9LAjRfFBmBArrY/primary/javascript-for-beginners/challenges/challenge-1-age-difference)
