Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Conversation

adniyaYousaf
Copy link

@adniyaYousaf adniyaYousaf commented Nov 16, 2023

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Ask any questions you have for your reviewer.

Copy link

netlify bot commented Nov 16, 2023

Deploy Preview for cute-gaufre-e4b4e5 ready!

Name Link
🔨 Latest commit c5fc9ff
🔍 Latest deploy log https://app.netlify.com/sites/cute-gaufre-e4b4e5/deploys/655659a0ca5e9f0008432f12
😎 Deploy Preview https://deploy-preview-87--cute-gaufre-e4b4e5.netlify.app/week-3/reading-list
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

This looks good, but the code is formatted a little messily - can you clean it up a bit? Do you have VS Code configured to auto-format on save? If not, I'd recommend setting that up!

const bookName = document.createElement("p");
bookName.innerText = book.title + "-------"+book.author;
li.appendChild(bookName);
//Display author of the book
Copy link
Member

Choose a reason for hiding this comment

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

Your comments seem a little unrelated to the code they're each applying to - I'd maybe remove them.

//Display author of the book
//Display title of the book
const img = document.createElement("img");
img.src = book.bookCoverImage;
Copy link
Member

Choose a reason for hiding this comment

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

Can you make sure to run your code through a formatter like prettier so it's consistent and easier to read?

img.src = book.bookCoverImage;
li.appendChild(img);

if(book.alreadyRead===false){
Copy link
Member

Choose a reason for hiding this comment

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

In general we don't tend to compare values with true or false.

An if statement takes an expression which evaluates to a truthy value, so another way of writing if (book.alreadyRead === false) is if (!book.alreadyRead) - we tend to favour the ! approach over the === false approach because it's more concise and we know alreadyRead is already a boolean.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants