Handling Browser Events with JavaScript: Challenge Dynamic Cards

The learning objective for this challenge is to practice event listeners for click events. You will also practice adding elements to the DOM, and removing elements from the DOM with the removeChild() method. You will even need to use the split() method on a string.

  1. Create an HTML page that contains a text area and a button labeled Create.
  2. When the user enters in text into the text area and then clicks the create button, use a factory function that creates a new DOM component that has a border, and includes it's own delete button.
  3. Insert that new component into the DOM.
  4. When the user clicks the Delete button, the containing card, and no other cards, should then be removed from the DOM. Not just made invisible, actually removed from the DOM.