diff --git a/11_getTheTitles/getTheTitles.js b/11_getTheTitles/getTheTitles.js index 74b04df..6dcf457 100644 --- a/11_getTheTitles/getTheTitles.js +++ b/11_getTheTitles/getTheTitles.js @@ -1,6 +1,17 @@ -const getTheTitles = function() { - -}; +const getTheTitles = function(array) { + return array.map(book => book.title) + }; + + const books = [ + { + title: 'Book', + author: 'Name' + }, + { + title: 'Book2', + author: 'Name2' + } + ] // Do not edit below this line module.exports = getTheTitles;