To avoidingavoid repeating console.log(), you can use library.reduce() which'll output a global result, then passed to the console only once.
Regarding your other concern about efficient concatenation, you can use tagged strings.
It results in a more compact code, like this:
var library = [
{
title: 'Bill Gates',
author: 'The Road Ahead',
readingStatus: true
},
{
title: 'Steve Jobs',
author: 'Walter Isaacson',
readingStatus: true
},
{
title: 'Mockingjay: The Final Book of The Hunger Games',
author: 'Suzanne Collins',
readingStatus: false
}
];
function displayInformation() {
console.log(library.reduce( (output, book) => output +=
`${book.readingStatus ? 'Already read' : 'You still need to read'} ${book.title} by ${book.author}.\n`, ''
));
}
displayInformation();