From bb84a9352e0658d2260b80273b642f38661d647f Mon Sep 17 00:00:00 2001 From: Harshil Gupta Date: Tue, 16 Jan 2024 19:11:29 +0530 Subject: [PATCH] Background music --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 84d10ae..0c26021 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ let bgMusic = new Audio(`/assets/music_bg/${index}.mp3`); function changeMusic() { bgMusic.src = `/assets/music_bg${index}.mp3`; - if (index <= music.length) { + if (index <= 5) { index += 1; } else { index = 1;