commit
b8baa269d6
|
@ -1,11 +1,7 @@
|
||||||
const getTheTitles = function(books) {
|
const getTheTitles = function(books) {
|
||||||
let bookTitles = [];
|
const mappedBooks = books.map(book => book.title);
|
||||||
|
|
||||||
books.forEach((book) => {
|
return mappedBooks;
|
||||||
bookTitles.push(book.title);
|
|
||||||
})
|
|
||||||
|
|
||||||
return bookTitles;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = getTheTitles;
|
module.exports = getTheTitles;
|
||||||
|
|
Loading…
Reference in New Issue