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

Tell us what’s happening:

quel est le probleme avec mon code je ne comprend pas parce j’ai respecté la consigne

Your code so far

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

/* file: styles.css */

/* 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-mm":
      currentDateParagraph.textContent =`${month}-${day}-${year}-${hours}Hours -${minutes}Minutes`;
      break;
  }

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

Challenge Information:

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

this is the output that you are getting with this code:
7-1-2024-13Hours -22Minutes
this is what you should be getting:
7-1-2024 13 Hours 23 Minutes

1 Like

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