Keeping tracks of which book to read

Hello guys, i have a problem with this piece of code, in the conditionals, the code has to tell if you have s already read the book or not. what have i done wrong?
below is the full code

var books = [{title:"Digital-Minimalism",author:"Carl-Newport",alredyRead:false},
             {title:"Outwitting-the-Devil",author:"Napolien-Hill",alredyRead:true},
             {title:"Rich-dad-poor-Dad",author:"Robert-K",alredyRead:true}]

books.forEach((book) =>  if(book.alredyRead == true){
    console.log(`You have already read ${book.title} by ${book.author}`)
}else{
console.log(`you still need to read ${book.title} by ${book.author}`);
}
 ) 

@Dkpro If you look at the error message you see in the console, it indicates you are not aware of how to properly use arrow function syntax. You are missing { after the => and before the last ) of the code. You must use the curly brackets if you are not just implicitly returning a value.

1 Like

Syntax error. Then try again.