If you're struggling to get data attribute javascript values, here’s a quick fix:
```js
const value = element.getAttribute('data-cool-stuff');
```
No fancy stuff, just works.
But `dataset` is nicer if you’re doing a lot of data-* stuff. Your call!
```js
const value = element.getAttribute('data-cool-stuff');
```
No fancy stuff, just works.
But `dataset` is nicer if you’re doing a lot of data-* stuff. Your call!
