I've been trying to display the value of each button, but unfortunately, nothing appears in the console when I click on them.
It seems like I'm overlooking something here and I just can't seem to figure it out.
const allButtons = document.querySelector("[data-buttons]");
Array.from(allButtons).forEach(button => {
button.addEventListener("click", () => {
let userPick = button.getAttribute("[data-pick]");
console.log(userPick);
});
});
Your help is greatly appreciated! :)