Tell us what’s happening:
Not sure what I’m doing wrong and I might be overthinking it. “You should add a break
statement within the case
after your logic.” I also tried removing semicolon before adding break;
but I still get the same message.
Your code so far
switch (dateOptionsSelectElement.value) {
case "yyyy-mm-dd":
currentDateParagraph.textContent = formattedDate
.split("-")
.reverse()
.join("-");
break;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Challenge Information:
Learn the Date Object by Building a Date Formatter - Step 21