Design comparison
SolutionDesign
Solution retrospective
Is my code understandable?
Did I use the semantic HTML tags correctly, should I add more or less?
In what areas of my code can I improve on?
All feedback is greatly appreciate. It helps me to improve as a frontend developer. Thanks!
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
Hello there ๐. Congratulations on successfully completing your first challenge! ๐
- I have other recommendations regarding your code that I believe will be of great interest to you.
JavaScript ๐ท๏ธ:
- The way you declared variables are hard to read and they are not well structured
const img = document.getElementById("photo"); const form = document.querySelector("form"); const emailInput = document.querySelector("#email"); const emailErrorMessage = document.querySelector("#email-error-message"); const iconError = document.getElementById("icon-error");
- instead try this,
const img = document.getElementById("photo"), form = document.querySelector("form"), emailInput = document.querySelector("#email"), emailErrorMessage = document.querySelector("#email-error-message"), iconError = document.getElementById("icon-error");
-
This single line declaration with separated commas will helps you to have a better structured code and improves readability though.
I hope you find it useful! ๐ Above all, the solution you submitted is great!
Happy coding!
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord