-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ITP-JAN|LONDON|FOROGH AGHAEIYARIJANI|BOOK LIBRARY PROJECT|WEE 2|problem solution #174
base: main
Are you sure you want to change the base?
ITP-JAN|LONDON|FOROGH AGHAEIYARIJANI|BOOK LIBRARY PROJECT|WEE 2|problem solution #174
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fixes you implemented work well and it now meets all of the requirements of this task. Here are a few things you should implement in order to make your code even better!
- Can you review all of the places that you declared a variable with 'let'? In general, you will mostly always use
const
(and this should be your default). If you need to reassign a value to the variable, then you would use let. Here is a video you can watch: https://youtu.be/RE6qf3As-XU?si=_YaiEPeBC5Cx_j56 - The changelist portion of your pull request is currently empty. This is an important part that helps other engineers understand what you've modified. Could you please add a brief description of your changes in the changelist section? A simple summary is good enough!
- Can you check off the list of requirements within the 'Self checklist' part of the PR? This is a good way to review what you need to do before submitting your PR. :)
⭐ This is a recommendation (you don't have to make this change but I highly recommend it). If you look within the package.json file, you'll see that there is a script named format
. If you run this script from the terminal, it will format your code to have a consistent style. The file .prettierrc
defines the formatting that will done if you run this script.
Thank you so much for reviewing my code.I did it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,45 +1,34 @@ | |||
let myLibrary = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an example of a variable that should be declared as a const.
There are other variables within script.js that are declared as let but should be const.
➡️ Can you find them and change them?
Using const prevents accidental reassignment of the variable and makes your code easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes,I did it.
Changelist: Added logic to display a table of books with ability to add/remove/update read status. Cleaned up variable declarations by replacing let with const where appropriate. Ensured form resets on successful book submission. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change list portion still needs to be updated. Please update directly within the changelist section!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 2 other let variables that should be changed to const since they are not being reassigned. Can you find them and make the change please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did it.
Learners, PR Template
Self checklist
Changelist
Added logic to display a table of books with the ability to add/remove/update read status.
Cleaned up variable declarations by replacing let with const where appropriate.
Ensured form resets on successful book submission.
Questions
Ask any questions you have for your reviewer.