I'm trying to select a specific audio element based on the key that's pressed. The issue is the compiler is reading the variable as a string. How can I get it to read it as a variable?
var hail = e.keyCode
var afile = document.querySelector("audio[data-id='hail']")