Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I feel like I could've wrote this code with less syntax but any help on this? . Form Events Exercise Time to get some practice
I feel like I could've wrote this code with less syntax but any help on this?
. Form Events Exercise Time to get some practice working with forms and form events: index.html already has a form element that contains two sinput> elements, one for quantity and one for a product name. index.html also contains an empty cuts where you will append new - on the page Reset the inputs Please note: 1. Udemy's interface does not yet recognize some of the newer JS syntax, e.g. append() You will need to use alternate (older) syntax for this method in order to get the tests to pass. 2. The form will need to be assigned to a variable named form for the test to pass, I've already included this line of code for you in the app.js code. Grocery List Enter A Quantity Submit Enter A Product 2 apples eggs asdasd Chicken breast dex.html ps 1 Leave the next line, the form must be assigned to a variable named 'fo 2 const form - document.querySelector('fo'); const ul-document.querySelectoralist): 04 const product.document.querySelector('product') 05 const qty document.querySelector('sty) 06 const inputAll document.querySelectorAll('input 7 form, addEventListener('submit'.ce) 8 e.preventDefault: 09 const pvolue-product.value 10 const qvolue aty.value ON const newidocument.createElement('') 012 const values.Value.concat( pvolue) On newli.inner Text-values) I 014 ul.appendChild(nent.) 15 inputAll volue 16 37 018 >>
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started