get elements by class name to array code example Example: javascript document object model getElementsByClassName document.getElementsByClassName('test')