While your code is functionally correct, I would not consider this final, clean code. There are a couple of issues that as a potential employer I would probably ask you to clean up before making a final decision.
I'll now go through the individual criteria that I defined for this assignment:
Your code must run without errors.
Requirement is met.
Your web page must be fit-for-purpose and well-designed. Place yourself in the role of an end-user: is the web page attractive and useful, or will you quickly click away?
Your links (<a> tags) are complete div's with complex content. This goes against the convention of a link being a simple string or image.
When you make a new request you should erase the HTML elements created by the previous request, otherwise it gets just appended at the end of the bottom of the previous HTML.
Your code must be well-formatted.
Requirement is met, although I would use a blank line here and there to separate code blocks.
Your repo must contain an .eslintrc.json file. There should be no avoidable ESLint warnings in your code. If you can fix the warning, do so. Please be prepared to account for any remaining warnings.
Requirement is met.
There should be no spelling errors in variable and function names, text strings and comments. If the VSCode spelling checker flags certain words as incorrect (and sometimes that is inevitable) you should be able to explain why that is. If you are uncertain about some word, consult an English dictionary.
There are some sloppy spelling errors in your index.html:
Requirement is met, but avoid unnecessary abbreviations.
Contribut -> Contributer (what is the purpose of abbreviating this?)
datas: data is already plural (datum is the singular form)
Consider blank lines to convey a meaning, similar to using blank lines to separate paragraphs in a piece of written text. A blank line between function/method definitions is fine. A blank line that breaks up a piece of code that actually belongs together is wrong. Whenever you add a blank line, carefully consider whether the blank line helps or hurts readability. Keep it in only if it helps.
Requirement is met.
There should be no commented out code in your final homework. (Just like you wouldn't leave crossed out text in your CV).
Requirement is met.
There should be no unnecessary console.log statements in your final code. These statements are fine when developing and debugging, but not in your final product (and, as per point 8 above, don't just comment them out).
Requirement is met.
Review your own code as if you were an employer yourself. Would you offer yourself an internship or job when running and looking at the code?
Probably dependent on a second round of clean ups.
You have used the createAndAppend utility function in some places, but at other places you still use createElement and appendChild manually. This is inconsistent.
I have refactored your code to make it more readable, see below. I haven't changed any CSS class names or element id's, but would be inclined to do so.
I have extended the createAndAppend function so that it can also deal with optional attributes.
Hi Jim,
thank you for your feedback its very useful for me, I will try to fix every thing you mention it, and I thank for teach us and I am proud to you be my teacher.
Hi Anas,
Here is my feedback on your final homework.
While your code is functionally correct, I would not consider this final, clean code. There are a couple of issues that as a potential employer I would probably ask you to clean up before making a final decision.
I'll now go through the individual criteria that I defined for this assignment:
Your code must run without errors.
Requirement is met.
Your web page must be fit-for-purpose and well-designed. Place yourself in the role of an end-user: is the web page attractive and useful, or will you quickly click away?
<a>
tags) are complete div's with complex content. This goes against the convention of a link being a simple string or image.Your code must be well-formatted.
Requirement is met, although I would use a blank line here and there to separate code blocks.
Your repo must contain an
.eslintrc.json
file. There should be no avoidable ESLint warnings in your code. If you can fix the warning, do so. Please be prepared to account for any remaining warnings.Requirement is met.
There should be no spelling errors in variable and function names, text strings and comments. If the VSCode spelling checker flags certain words as incorrect (and sometimes that is inevitable) you should be able to explain why that is. If you are uncertain about some word, consult an English dictionary.
There are some sloppy spelling errors in your
index.html
:_Variable and function names must conform to these naming conventions._
Requirement is met, but avoid unnecessary abbreviations.
datum
is the singular form)Consider blank lines to convey a meaning, similar to using blank lines to separate paragraphs in a piece of written text. A blank line between function/method definitions is fine. A blank line that breaks up a piece of code that actually belongs together is wrong. Whenever you add a blank line, carefully consider whether the blank line helps or hurts readability. Keep it in only if it helps.
Requirement is met.
There should be no commented out code in your final homework. (Just like you wouldn't leave crossed out text in your CV).
Requirement is met.
There should be no unnecessary console.log statements in your final code. These statements are fine when developing and debugging, but not in your final product (and, as per point 8 above, don't just comment them out).
Requirement is met.
Review your own code as if you were an employer yourself. Would you offer yourself an internship or job when running and looking at the code?
Probably dependent on a second round of clean ups.
You have used the
createAndAppend
utility function in some places, but at other places you still usecreateElement
andappendChild
manually. This is inconsistent.I have refactored your code to make it more readable, see below. I haven't changed any CSS class names or element id's, but would be inclined to do so.
I have extended the
createAndAppend
function so that it can also deal with optional attributes.