+ 1

Why my code is behaving weirdly?

https://sololearn.com/compiler-playground/W2E5bF7iFB4v/?ref=app In this code when i click on the last song (ur name). It's causing error. But when i click on that song AFTER i already clicked on any random song besides ur name. Then it works fine. Why is that?

26th Jul 2025, 4:18 PM
Manav Roy
Manav Roy - avatar
2 Réponses
0
Did you fix it? It seems fine when I run it and immediately try the last song. If it is still a problem, then a debugging technique that you might try is to move the last song elsewhere in the list and see whether the bug moves also.
26th Jul 2025, 6:51 PM
Brian
Brian - avatar
0
Brian I didn't do anything but i realised it's probelm with my phone. Cuz it was throwing "user gesture" error on last and second last songs. Which means that i didn't click it properly....(But i did) But yeah it's working fine now.
26th Jul 2025, 6:55 PM
Manav Roy
Manav Roy - avatar