1 var buttons = document.querySelectorAll("button");
2
3 for (button in buttons) {
4 buttons[button].onclick = function() {
5 console.log('test')
6 buttons.forEach(function(btn){
7 btn.classList.remove('highlight');
8 })
9 this.classList.add('highlight');
10 }
11}