See the Pen JavaScrip: Eventos 1 by lTakisl (@ltakisl) on CodePen.
See the Pen JavaScrip: Eventos 2 by lTakisl (@ltakisl) on CodePen.
See the Pen JavaScrip: Eventos 3 by lTakisl (@ltakisl) on CodePen.
Well I have been able to solve exercise 1 and 2, exercise 2 I have used the event.key but it is not clear to me if that is the correct procedure or how I should have done it and what is used and in what cases, it has really cost me to get there to that. On the other hand, exercise 3 has been impossible for me, I have modified the code so many times that I no longer know how it was, or if it was on the right track.
But the biggest problem of all that is that I don’t know how to get the color of the data-color of each of the buttons so that it gives me as a result in the line
buttonBar.style.backgroundColor = ‘’;
As long as what I did is well planned. And if not, how should it be? it really made my head ache XD.