Tell us what’s happening:
i don´t understand why the challenge don´t pass
Instructions
Before deleting a song, you need to check if the song is currently playing. If it is, you need to pause the song and play the next song in the playlist.
Use an if
statement to check if the userData?.currentSong?.id
is equal to the id
of the song you want to delete.
Your code so far
if(userData?.currentSong?.id = id) {}
The challenge tell me a syntax error.
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Challenge Information:
Learn Basic String and Array Methods by Building a Music Player - Step 78