Lurker and new to posting here.

I'm looking for a solution to this:

```
<a points="0" href="#" class="btn">Button Text</a>
<a points="1" href="#" class="btn">Button Text</a>
<a points="2" href="#" class="btn">Button Text</a>

<div class="success"></div>
<div class="failure"></div>

```

I need to find a way for a function/loop, to add the data attribute value (points) into an array, and calculate that if the result is >3 to show the "success" div, else to hide it and show the "failure" div.

I've no idea where to start honestly here and would appreciate help. I searched online for some results to put some code together but there wasn't too much on grabbing data attribute value on click and pushing it into an array.

Thanks in advance!