code refactoring

better naming of temporary variable for forEach
loop
This commit is contained in:
emma 2025-02-06 08:22:54 -05:00
parent d290bd7db0
commit 4891aca2f8
1 changed files with 4 additions and 4 deletions

View File

@ -33,10 +33,10 @@ const baxterHeadPat = () => {
const main = () => {
const tiles = document.querySelectorAll(".tile");
tiles.forEach((el) => {
el.style.cursor = "pointer";
el.addEventListener("click", () => {
displayNote(el);
tiles.forEach((tile) => {
tile.style.cursor = "pointer";
tile.addEventListener("click", () => {
displayNote(tile);
});
});