jQuery has a function called .remove() that will remove an HTML element entirely.
.remove()
$("#target4").remove();
There was an error while loading. Please reload this page.
New to Free Code Camp?
JS Concepts
JS Language Reference
Other Links