Day 4 — Found a solution

Solution mindset

It took a while but I was able to find a solution to the problem from day 3, I sat with the problem and then I came back with a fresh mind and it was solved.

The solution was that I chain the deprecated property to an alternative which was key instead of keyCode for the keyboard event.

const audio = document.querySelector(`audio[data-key = "${e.key.toLowerCase() 😁}"]`)