odin-javascript-exercises/11_getTheTitles
2023-06-19 17:23:59 -07:00
..
solution Updated file paths 2023-02-01 18:53:54 -05:00
getTheTitles.js Make 11 tests pass 2023-06-19 17:23:59 -07:00
getTheTitles.spec.js Rename folders with numbers and underscores 2021-08-07 14:52:11 +08:00
README.md Rename folders with numbers and underscores 2021-08-07 14:52:11 +08:00

Exercise 11 - Get the Titles!

You are given an array of objects that represent books with an author and a title that looks like this:

const books = [
  {
    title: 'Book',
    author: 'Name'
  },
  {
    title: 'Book2',
    author: 'Name2'
  }
]

Your job is to write a function that takes the array and returns an array of titles:

getTheTitles(books) // ['Book','Book2']

Hints

  • You should use a built-in javascript method to do most of the work for you!