In the code snippet given below, the constant named BOOKS
holds the details of some books, where each book has a title
and author
. The Book
component displays the detail of a single book. Your task is to use the map()
method to generate a list of books with their respective title and author.
The output should look like the image given below.