Element removeEventListener Lab

Medium
1
0.0% Acceptance

In this lab, you will demonstrate your understanding of removeEventListener by creating a simple web page with buttons and event listeners. The removeEventListener method allows you to remove previously attached event listeners from an HTML element.

You will create a button with id add and another button with id remove. You will also create a div called status that displays the status of event listeners. When the user clicks on the add button, a click event listener will be added to the remove button to display an alert saying 'Button clicked!'. When the user clicks on the remove button, the click event listener added previously should be removed.

To successfully complete this lab, you must complete the following challenges:

  1. Create the add button with the correct id.
  2. Create the remove button with the correct id.
  3. Create the status div that updates the status of event listeners.
  4. Add a click event listener to the add button.
  5. Add a click event listener to the remove button.
  6. Remove the click event listener from the remove button.

You must also write an evaluation script that ensures all challenges are met and can be tested within the lab environment.