Guess What! Challenge #1 of December 2019 has been started. The challenge is to help us build towards our goal of a JavaScript Library. So lets make the best of it.
Challenge Description
Create an algorithm that will take all the inputs of a form (except the submit button) and assign variables to each of their values. Example:
<body>
<form>
<input type="text" id="first_name">
<input type="text" id="last_name">
<input type="submit" id="submit_btn">
</form>
</body>
let btn = document.querySelector("#submit_btn");
// End Result to be produced (but through algorithm)
btn.addEventListener("click", () => {
let first_name_input = document.querySelector("first_name").value;
let last_name_input = document.querySelector("last_name").value;
})
Make sure the variable name comes from the ID of the element, and adds _input to each variable name.
Submission
No one is excluded from submitting their challenge efforts, but here is something that you should know: Even if you get it wrong the first time, submit it, and we will look over it and see where you could improve or how to fix your mistake. We will support you until you get the challenge right.
The challenge is not only for the winning purposes, but it is also for the chance for you as a developer to get support regarding your skills.
Where can I host it?
- Codepen.io
- codesandbox.io
- stackblitz.com
- Netlify – If you want to live host the code
To Submit:
- Email Me: nanoproductions2@gmail.com
- Send a Contact Request with the Link
- Leave a comment with the link, with your email address