0

Why my code is not working?

https://sololearn.com/compiler-playground/WpcagVoCUwVO/?ref=app When i click on play button. I expect that icon get removed. But instead. It's showing error. The error arises because of line 53-57 of javascript. But I have no idea why!

21st Jul 2025, 3:13 AM
Manav Roy
Manav Roy - avatar
5 odpowiedzi
+ 1
Event listener Incomplete... Array.from(document.getElementsByClassName("songItemList")).forEach((e)=>{ e.addEventListener("click",function(){ e.target.classList.remove("far fa-play-circle"); // The logic to play the specific song is missing
21st Jul 2025, 3:22 AM
Zero
Zero - avatar
+ 1
Music switching does not happen in the code There are some variables that are not used yet in your project
21st Jul 2025, 3:23 AM
Zero
Zero - avatar
+ 1
Zero I think it's the same code I've written 😅
21st Jul 2025, 3:24 AM
Manav Roy
Manav Roy - avatar
+ 1
Yeah yeah, but it is incomplete and that is the error. Do you want me to send the correct code? I don't think that's right...
21st Jul 2025, 3:26 AM
Zero
Zero - avatar
0
Zero Music switching doesn't happen in my code cuz it's only 40% completed and I'm yet to add all the features... I just want it remove the play icon when i click on it. But it's throwing error and idk why. What do u mean by "Event listener incomplete"?
21st Jul 2025, 3:28 AM
Manav Roy
Manav Roy - avatar