I have written a destructured array that contains famous books in the form of objects . It lists the authors name, three books they wrote, their books genre and their publisher. I wrote a forloop that iterates through the destructured array. I expect the forloop to print out the authors name and their three books, but it actually prints out the authors name and just the object representation:
//AuthorStephen King,Books: [object Object]
//AuthorArthur Clarke,Books: [object Object]
//AuthorRobert Heinlein,Books: [object Object].
Here is the link to my code: https://codepen.io/noblegas/pen/JjorBpP