var buttons = document.getElementsByClassName('buttons');
var button;
for(var i=0; i<buttons.length; i++){
button = buttons[i]
button.addEventListener('click', some_function)
}
document.body.addEventListener('click', (event) => {
if (event.target.matches('.buttons')) {
some_function(event)
}
})
for(let i=0; i<buttons.length; i++){
button = buttons[i]
button.addEventListener('click', some_function)
}