code refactoring
better naming of temporary variable for forEach loop
This commit is contained in:
parent
d290bd7db0
commit
4891aca2f8
|
@ -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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue