Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Good work on setting up the core logic for this task! The calculations for age and century are correct. However, this submission requires changes because two critical errors are preventing the script from running.
- In
src/scripts/main.js, thepeoplevariable is declared twice: once as a large hard-coded array (lines 3-355) and again via animport. This causes aSyntaxError. Please remove the hard-coded array and rely on the imported JSON data. - There's a typo in a variable name. You declared
centueyon line 367, but then tried to usecenturyin the template string. This results in aReferenceError. Please correct the spelling in the declaration.
Once these two issues are fixed, your code should work as expected. Keep up the great effort!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| console.log(people); // you can remove it | ||
|
|
||
| // write your code here | ||
| import people from './people.json'; |
There was a problem hiding this comment.
The people variable is declared twice: once as a large hard-coded array at the top of this file (lines 3-355), and again with this import statement. This will cause a SyntaxError. According to the task instructions, you should use the data from people.json, so the hard-coded array should be removed.
| <td>${person.born}</td> | ||
| <td>${person.died}</td> | ||
| <td>${age}</td> | ||
| <td>${century}</td> |
There was a problem hiding this comment.
This line will cause a ReferenceError because the variable century is not defined. It appears there's a typo in the variable declaration on line 367, where it's named centuey. Please ensure the variable names match.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this pull request! I am approving your solution as you've successfully met all the task requirements. Your script correctly processes the JSON data, calculates the age and century, and dynamically populates the table as expected.
Please don't worry about the failed automated check. As noted in the analysis, this was due to an environment setup issue and is not a problem with your code. Your implementation is correct. Great job!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.