select all elements with a given class js code example Example: javascript get all classes var allHiddenElements = document.getElementsByClassName("hidden");