JenMorgan / js-learning

0 stars 0 forks source link

Write a JavaScript program to display all authors of the following books #23

Open kartamyshev opened 4 years ago

kartamyshev commented 4 years ago
var library = [ 
   {
       author: 'Bill Gates',
       title: 'The Road Ahead',
       readingStatus: true
   },
   {
       author: 'Steve Jobs',
       title: 'Walter Isaacson',
       readingStatus: true
   },
   {
       author: 'Suzanne Collins',
       title:  'Mockingjay: The Final Book of The Hunger Games', 
       readingStatus: false
   }];
JenMorgan commented 4 years ago
const displaybooksTitles =  (arr) => console.log(arr.map(({title}) => title));

displaybooksTitles(library);