Learn Basic String and Array Methods by Building a Music Player - Step 71

Tell us what’s happening:

I put playSong(setPlayerDisplay()) in Step 71, the check you code box shows: Sorry, your code does not pass. You should call the setPlayerDisplay function inside the playSong function. I used Chrome and Safari browsers, neither works. Does anyone can help me? Customer services?

Your code so far

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

/* file: styles.css */

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

 playSong(setPlayerDisplay());

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36

Challenge Information:

Learn Basic String and Array Methods by Building a Music Player - Step 71

If you look at your code as a whole, you’ll see that the Editable Region for this step is already inside the playSong function definition, so you don’t need to call the function again. Just call the setPlayerDisplay function on its own. It will then be called every time playSong is called.

Also, just to be clear. Calling a function inside a function is not the same as passing one function’s return value as the argument to another function.

The first is part of the function definition, the latter is part of the functions’ invocation (at the place it is called).

Called inside:

const outerFn = () => {
  return innerFn();
}

Passed as an argument:

outerFn(innerFn());
1 Like

Still not work. So confused.

please share your updated code