Iterate on an array and append the result to the document

hello everyone
i wanted to Write javascript code to dynamically display the list of movies with their images, title, director and rating but when creating the <ul> and <li> elements and appending them to the document nothing is appears maybe there is something wrong with the for loop and with the returned value but couldn’t figure it out, this is my codepen
any help will be great

update:
I’ve managed to make the array elements (which are objects nested inside the array ) to appear but its just showing [object Object]

1 Like

Hi @aliibra9214

Your movie object (

{
    director: 'Christopher Nolan',
    title: 'Dark Knight',
    rating: '9',
    img: "feel free to choose any link"
  }

) has not property called name, so you could try with movie[title] or movie.title, for example.

I think that is the issue.

I hope that helps, happy coding!!

1 Like

Thanks alot @carlosvisator this was the issue.