Intro sign up form component, using flexbox and form validation

Solution retrospective
HI!
This is the first time I do a form validation with Javascript. I'm not sure if my approach is correct or there are better ways to do it. I have a feeling that I have overcomplicated and that I could have done it with less code.
Another question I have is, how can I improve the accessibility of the form?
Of course any other feedback to help me improve is welcome.
Thank you!!
Please log in to post a comment
Log in with GitHubCommunity feedback
- @0xabdulkhaliq
Hello there 👋. Congratulations on successfully completing the 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 need to be well structured and organized
- Take a look at the following example code which describes an efficient way of declaring variables
const firstName = "Your"; const lastName = "Name"; const emailAddress = "example@some.com"; const password = "supersecret";
- instead try this,
const firstName = "Your", lastName = "Name", emailAddress = "example@some.com" ••• ••• // n number of declarations password = "supersecret"; // make sure to add a semicolon at end of last declaration
- This single line declaration with separated commas will helps you to have a better structured code and improves readability though
.
I hope you find this helpful 😄 Above all, the solution you submitted is great !
Happy coding!
Marked as helpful
Join 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