Assessment wanted for Events 3 skill test

Did I use the correct way to get the attribute value?
Thank you very much.
A Pen by Christian Barrameda (codepen.io)
-Burds

Hi @Burds and welcome to the community :wave:

Yes, this is the correct way. :+1:
You can make the code simpler by removing the template string and the expression code. So this would be fine:

e.target.getAttribute('data-color')

As an alternative when working with data-* attribute, you could also use dataset:

e.target.dataset.color

This will give the same result as your code.

I hope that helps. :slightly_smiling_face:

Have a nice day,
Michael