Hi @ILA_Saxena and welcome to the community
Nice work!
I have two remarks:
- The task asks to change the color of the
button-bar
(the element around the buttons) not the buttons themselves. Do you know how you could achieve that?
- While it works to use
innerText
to get the color, it feels a bit brittle. In real projects texts tend to change over time, which would break your code. You could use the data-color
attribute for that. There’s a nice way to access data-*
attributes: dataset.
Feel free to ask questions if something isn’t clear.
See you,
Michael