Removing stuff ...all the things

Here's a list with several sepcial items.

Here's a list where we remove the sepcial items.

Same idea, but with a library function.

navigate my process

related content

The Explanation

We can go a step further, here, of course, by removing all of something, of course, which I do over here, in example 2. Here you're just getting a NodeList (using our getAllFromPage() library function) and iterating over the result using .forEach(), passing in each element one by one and going the parentNode.removeChild() step.

That quickly becomes a library function, too: removeAllOf().