Question: Question has sub parts: I need help with this 5a. Create a function with the name processFood(). Within the function, do the following: a. Declare
Question has sub parts: I need help with this
5a. Create a function with the name processFood(). Within the function, do the following: a. Declare five local variables: prop; crustOpt, which references the elements with the name crust; toppings, which has a value of ; toppingBoxes, which references the elements with the name toppings; and instr, which references the element with the id value instructions. b. Add an if/else statement that checks if the first item in the crustOpt array is checked. If so, the crust property of the foodInfo object should be assigned the value of the first item in the crustOpt array; otherwise, the crust property of the foodInfo object should be assigned the value of the second item in the crustOpt array.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
