Tell us what’s happening:
Help me to fix the error
Error meassage:Your answer should follow this format: mm-dd-yyyy h Hours m Minutes. Replace mm, dd, yyyy, h, and m with the month, day, year, hours, and minutes variables you created earlier.
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-mm":
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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Challenge Information:
Learn the Date Object by Building a Date Formatter - Step 26