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

Tell us what’s happening:

code does not run,
seems I am following instructions from the instructions and forum

Your code so far

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

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


  switch (dateOptionsSelectElement.value) {
    case "yyyy-mm-dd":
      currentDateParagraph.textContent = formattedDate
        .split("-")
        .reverse()
        .join("-");
      break;
    case "mm-dd-yyyy h Hours m Minutes":
      currentDateParagraph.textContent = `${month}-${day}-${year} ${hours} Hours ${minutes} Minutes`;
      break;
  }

// User Editable Region
/* file: styles.css */

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 the Date Object by Building a Date Formatter - Step 28

Hi @Dantheman1

Use the case mentioned in the instructions.

Happy coding

2 Likes