Question: In HTML and JavaScript please create the following. Create two buttons. Create an output division with an empty ordered list inside the division. Is linked
In HTML and JavaScript please create the following.
- Create two buttons.
- Create an output division with an empty ordered list inside the division.
- Is linked to an external JavaScript file. The JavaScript should:
- Respond to the click event of the first button. When the button is clicked a function should:
- Create an array of at least 5 items
- Use a loop to iterate through each item. The loop should use DOM methods to generate and add a list item to the (previously) empty ordered list inside the output division.
- Respond to the click event of the second button. When the button is clicked a function should:
- Create either a JavaScript object or JSON object in order to store data. The data should have at least three properties and associated values.
- Use DOM methods to generate and add a paragraph to the end of the output division. The paragraph should print out each value of the defined properties for the object.
- Respond to the click event of the first button. When the button is clicked a function should:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
