Problems

DOM Manipulation

EasyJavaScript

Create a JavaScript function that takes a string of HTML as input and returns the HTML with all div elements removed.

Example 1

Input: <div>Hello World!</div><p>This is a paragraph.</p>

Output: <p>This is a paragraph.</p>

The input contains a `div` element that should be removed.

Constraints

  • The function should take a string of HTML as input
  • The function should return the HTML with all `div` elements removed

Hints

DOM manipulation