Removing stuff ...one function to rule them all

Here's a list with one sepcial item.

Here's a list with several sepcial items.

Here's the same lists with the special items removed using a library function.

navigate my process

related content

The Explanation

Then of course I thought it would be nice to have just one function we could call—remove()—which we could pass either a single element or a NodeList to and have the function take care of the rest for us. So in this example we have the function check to see if it's received a NodeList; if so, it passes it to removeAllOf(), otherwise, it sends it off to removeElement().

I'm sure this isn't bullet-proof. But all I'm going for is demo-worthy right now.