javascript get all classes of element code example Example: javascript get all classes var allHiddenElements = document.getElementsByClassName("hidden");