odin-js-fundamentals-part-5/11_getTheTitles/solution/getTheTitles-solution.js

6 lines
117 B
JavaScript

const getTheTitles = function (array) {
return array.map((book) => book.title);
};
module.exports = getTheTitles;