Build a Music Player - Step 35

Tell us what’s happening:

Hello there,
do you have any advice about this question?

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

function playPreviousSong(){
  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/141.0.0.0 Safari/537.36

Challenge Information:

Build a Music Player - Step 35

Do you have a question about how you’re stuck?

yes please , I don’t know what is the issue

That’s not a question though? That’s a statement.

What did you try to figure out what the issue might be?

if the current song is null and stop the function execution with a return statement

can you share all the code you have in the editor including that outside the editable region?

you may have changed something that’s making the tests fail, considering playPreviousSong was an arrow function at the start of the step

That’s also not a question. Can you try answering my question please? I can go do this and then slowe it for you, but that would leave you learning really nothing, which is why I’m asking about what you have tried and how you are stuck.

1 Like

i add an if statement at the beginning of the playPreviousSong function that checks if userData.currentSong is null.
anyway I get it ,
Thank you very much ,I appreciate you trying to help me,

1 Like