You are writing the display engine for a modern fountain soda machine. The machine has attributes for each product defined by the sodas data structure. The machine needs to display the selected list of attributes so the customer can make a choice. The attributes to be displayed are defined by the attributeList array. Write code that iterates over sodas and outputs the attributes and their values.
If possible, write the code to handle both iterations without having to modify the code. It should only be necessary to substitute the attributes to be printed.
Ground Rules:
You are allowed copy/paste the code from the question into your development environment.
You may use the Savvy Coders curriculum, MDN or any code you have previously written as resources to solve the problem.
List of sodas
|
Attribute List
Expected Output
Second IterationAttribute List
Expected Output
|