const elements = document.getElementsByClassName('myclass'); Array.from(elements).forEach(element => console.log(element));