Skip to content

Commit

Permalink
update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sugoides committed Feb 13, 2024
1 parent b57d39a commit 20eefea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion will-you-be-my-valentine/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ let noCount = 0;
function preloadImages() {
// Preload images
const preloadedImages = [];
const img = new Image();
for (let i = 1; i <= MAX_IMAGES; i++) {
const img = new Image();

img.src = `img/cat-${i}.jpg`;
preloadedImages.push(img);
}
Expand Down

0 comments on commit 20eefea

Please sign in to comment.