Date object date formatter step 28

why it doest pass?

Inside the case for mm-dd-yyyy-h-mm , use string interpolation to assign the formatted date from above to the textContent property of currentDateParagraph . Make sure to use the month , day , year , hours , and minutes variables in your answer.

 case "mm-dd-yyyy-h-mm":
      currentDateParagraph.textContent = `${month}-${day}-${year} -${hours} Hours - ${minutes} Minutes`;
      break;
  }

can you give the link to the step?

Your answer should follow this format: mm-dd-yyyy h Hours m Minutes .

So let’s see the formatted date time:

4-21-2024 -10 Hours - 55 Minutes

you have dashes where they shouldn’t been

1 Like

solution:
currentDateParagraph.textContent = ${month}-${day}-${year} ${hours} Hours ${minutes} Minutes;
break;