how to find what number a element is in a class code example Example: javascript find total number of classes document.getElementsByClassName("ClassName").length