odin-default-js-exercises/getTheTitles
Michael Frank b984cb4c6f Merge branch 'master' of TOP/javascript-exercises 2021-05-09 00:29:44 +12:00
..
README.md add titles solution 2019-04-11 12:14:20 -05:00
getTheTitles.js add titles solution 2019-04-11 12:14:20 -05:00
getTheTitles.spec.js update tests, multiple exercises 2021-03-10 00:12:25 +13:00

README.md

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!