Tell us what’s happening:
// running tests You should add an else block to the existing if block. You should set audio.currentTime to userData.songCurrentTime inside the else block of your if statement. // tests completed
I can’t recognise what is wrong.
Your code so far
if (userData?.currentSong === null || userData?.currentSong.id !== song.id) {
audio.currentTime = 0;
}else{
audio.currentTime = userData.songCurrentTime;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Learn Basic String and Array Methods by Building a Music Player - Step 25