odin-javascript-exercises/getTheTitles
Marvin Gay ad1c0c407f Revert "Merge branch 'jest'"
This reverts commit f76e9e108f.
2021-05-12 22:10:23 -04:00
..
getTheTitles.js Revert "Merge branch 'jest'" 2021-05-12 22:10:23 -04:00
getTheTitles.spec.js Revert "Merge branch 'jest'" 2021-05-12 22:10:23 -04:00
README.md Revert "Merge branch 'jest'" 2021-05-12 22:10:23 -04:00

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!