const notesForEmma = { tileOne: "hello", tileTwo: "emma", tileThree: "how", tileFour: "are", tileFive: "you", tileSix: "i", tileSeven: "think", tileEight: "you", tileNine: "are", tileTen: "a", tileEleven: "great", tileTwelve: "person", }; const tiles = document.querySelectorAll(".tile"); tiles.forEach((el) => { el.addEventListener("click", () => { console.log(`${notesForEmma[el.className.split(' ')[0]]}`); }); });