<div class="letters">
<button class = "let" data-name='q'>q</button>
<button class = "let" data-name='w'>w</button>
<button class = "let" data-name='e'>e</button>
<button class = "let" data-name='r'>r</button>
<button class = "let" data-name='t'>t</button>
<button class = "let" data-name='y'>y</button>
</div>
const values = [...document.querySelectorAll('[data-name]')].map(entry => entry.dataset.name);