```
<div id="test" class="a1 a2 a5"></div>

var element = document.getElementById("test") 
if (hasAnyOfTheseClasses(element, ["a1", "a6"])) { 
   //...
}

```

Looking for a simple, lightweight function to check if a function has any of the listed classes without jQuery or another library.

Such function would be easy to implement, but there should be a canonical, fastest and simplest answer people can just copy-paste. 

**This seems vampire-ish,** but I'm asking this so googlers won't have to write it themselves.

Not a duplicate - the linked question checks for *one* class, this question asks for checking *any* of the classes.

[A jQuery version exists here.](https://stackoverflow.com/questions/8049385/jquery-how-to-check-if-element-has-any-of-these-classes)