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

Tell us what’s happening:

I can’t get the correct syntax. I checked MDN and all of the js forums but I can’t find an answer to what I’m doing wrong.

Your code so far

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

/* file: styles.css */

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

playButton.addEventListener("click") => {
  
}

// 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/124.0.0.0 Safari/537.36

Challenge Information:

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

You need to pass a callback function as the second parameter to the addEventListener() call, after “click.”

playButton.addEventListener("click", callBackFunction);

In this case, they are asking that your callback function be an empty arrow function expression: () => {}

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.