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 main = () => {
const tiles = document.querySelectorAll(".tile"); const tiles = document.querySelectorAll(".tile");
tiles.forEach((el) => { tiles.forEach((tile) => {
el.style.cursor = "pointer"; tile.style.cursor = "pointer";
el.addEventListener("click", () => { tile.addEventListener("click", () => {
displayNote(el); displayNote(tile);
}); });
}); });