Skip to content

Conversation

@alexandru-pocovnicu
Copy link

@alexandru-pocovnicu alexandru-pocovnicu commented Nov 15, 2025

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

In this PR I have looped through an array, created DOM elements and appended them to the DOM

@alexandru-pocovnicu alexandru-pocovnicu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 15, 2025
@jennethydyrova jennethydyrova added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Nov 22, 2025
Copy link
Contributor

@jennethydyrova jennethydyrova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alexandru-pocovnicu! Very good work on this exercise. There are few comments I left that will make you code cleaner.

];

function readingList() {
const unorderedList = document.querySelector("#reading-list");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a good name for the variable? Another thing, what if you code cannot find this dom element? How can you guard your function against it?

Comment on lines 29 to 31
const title = book.title;
const author = book.author;
newImage.src = book.bookCoverImage;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is okay but can you check how to destructure an object to get field values? This will make you code cleaner.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, this was interesting

Comment on lines 34 to 35
newList.appendChild(paragraph);
newList.appendChild(newImage);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you think of another way to append both paragraph and newImage in one line?

Comment on lines 163 to 164
#reading-list img {
size: ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 🤷‍♂️

@jennethydyrova jennethydyrova added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Nov 22, 2025
@alexandru-pocovnicu
Copy link
Author

Thank You.

@alexandru-pocovnicu alexandru-pocovnicu added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Nov 23, 2025
Copy link
Contributor

@jennethydyrova jennethydyrova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

for (const book of books) {
const newList = document.createElement("li");
const newImage = document.createElement("img");
const { title, author, bookCoverImage } = book;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could do something more interesting. Just fyi

  for (const {title, author, bookCoverImage, alreadyRead} of books) {}

@jennethydyrova jennethydyrova added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Nov 23, 2025
@alexandru-pocovnicu alexandru-pocovnicu closed this by deleting the head repository Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants