Learn Modern JavaScript Methods by Building Football Team Cards - Step 33

Tell us what’s happening:

do I need to create a function? then show it empty for the event listener? so I need help with this one please

Your code so far

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

/* file: styles.css */

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

function userMadeSelection(){
  console.log("user made a selection")
};
playersDropdownList.addEventListener("change", userMadeSelection());
// what empty call back function can go here.  make a function at the top thats empty? and in the event listener

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15

Challenge Information:

Learn Modern JavaScript Methods by Building Football Team Cards - Step 33

Hi @Dantheman1

  1. Your event listener should have an empty callback function.

You do not need to create a new function.

For now, pass in an empty call back function instead.

Happy coding

1 Like

Hi Teller, thanks for the quick reply. () => {} that’s an empty function. does it need a name? to call it back

It doesn’t need a name in this case. It is “anonymous “.

1 Like