diff --git a/11_getTheTitles/getTheTitles.js b/11_getTheTitles/getTheTitles.js index 74b04df..e7b861e 100644 --- a/11_getTheTitles/getTheTitles.js +++ b/11_getTheTitles/getTheTitles.js @@ -1,5 +1,21 @@ -const getTheTitles = function() { +const getTheTitles = function () { + const books = [ + { + title: "Book", + author: "Name", + }, + { + title: "Book2", + author: "Name2", + }, + ]; + let titles = []; + + books.forEach((book) => { + titles.push(book.title); + }); + return titles; }; // Do not edit below this line