I have made a book array with nested object showing the different books information like title,author etc.
For example :
Const books = [
{
Title: ABC
OnlineRead: true
}
{OnlineRead : false
... Etc}
]
One of the books variable is onlineRead
But in one of the book this variable is not declared
And I was practicing short circuits, I have to log the books with true onlineRead
So my code is
For(let I =0;I <= books.length; I++) {
Return books[i].onlineRead && console.log( book is online ) }
But I forgot how to ignore undefined