Learn the Date Object by Building a Date Formatter - Step 15

Tell us what’s happening:

I cant figure out the code to do it i have tried everything

Your code so far

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

/* file: styles.css */

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

addEventListener.dateOptionsSelectElement

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Learn the Date Object by Building a Date Formatter - Step 15

addEventListener needs to be called on an element. Let’s say your element is button, you would call button.addEventListener(). Inside the parenthesis you need a string that indicates the type of event, and then a function, which will be executed when the event happens

Hi.

Just follow the steps and you will pass it, also you have to search what “empty arrow function” means, then you’ll notice that the answer was in the example FCC gives us.

dateOptionsSelectElement.addEventListener("change", () => {
    
});

That’s it, if you don’t know some word or some part of code don’t forget INVESTIGATE, It’s almost mandatory.

Best wishes.