quora javascript get element by classe

var elementsArray = document.getElementsByClassName("someclassname");
Grepper