parent
8746ce056a
commit
4fba21edb1
|
@ -1,5 +1,21 @@
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue