Yo, `dataset` is the way to go for sure! But if you wanna keep it old-school, `getAttribute()` works too.
Pro tip: if you're debugging, just `console.log(element.dataset)` to see all the data attributes at once. Saves time!
Also, MDN has a great doc on get data attribute javascript stuff: https://developer.mozilla.org/en-US/docs...nt/dataset
Pro tip: if you're debugging, just `console.log(element.dataset)` to see all the data attributes at once. Saves time!
Also, MDN has a great doc on get data attribute javascript stuff: https://developer.mozilla.org/en-US/docs...nt/dataset
