Syntaxerror: missing ) after argument list

Syntaxerror: missing ) after argument list
0

#1

The code is:

window.addEventListener(‘keydown’, function(e) {
const audio = document.querySelector(‘audio[data-key="${e.keyCode}"]’)
console.log(audio);
}
);

I using this to invoke audio when I press keys on the keyboard. This code should, at least show, when I hit the assign keys. All I’m coming back with is this syntaxerror though.


#2

nevermind, figured it out. I was using the single quotes when I should have been using the accent grave.