How can I get the '123' value from the following code? I thought the snippet should work but I instead get email :....
<div id="home">
<div class="name" my-data="123">Email: test@gmail.com</div>
</div>
var element = document.querySelector('.element');
var dataAttribute = element.getAttribute('my-data');
console.log(dataAttribute);