all class length in javascript code example
Example 1: javascript find total number of classes
document.getElementsByClassName("ClassName").length
Example 2: javascript get all classes
var allHiddenElements = document.getElementsByClassName("hidden");