var temp; complexityChoose(event){ if(temp) temp.style.backgroundColor = ''; temp = event.target; temp.style.backgroundColor = '#006eff'; }