Here’s a simple function I use pretty commonly – has 2 uses. If passed with no arguments, it returns the tag name of the element. If passed with any arguments, it returns true if the element’s tag name matches any of the arguments, false if not.

usage…