Tell us what’s happening:
I’m rather confused. The test error message says “You should add an if statement that checks if userData.currentSong === null and stops the function execution with a return statement inside your playPreviousSong function.” From my understanding that’s exactly what I am doing. Is there a spelling error or something I’m misunderstanding/overlooking?
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
if(userData.currentSong === null){
return;
}
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Challenge Information:
Build a Music Player - Step 35