Use the textContent property on currentDateParagraph to set its text content to the value of the formattedDate variable.
Also, make sure to remove your console.log(formattedDate); line.
im having issues passing this stage.
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
const formattedDate = `${day}-${month}-${year}`;
let formattedDate = element.textContent = 'currentDateParagraph';
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Challenge Information:
Learn the Date Object by Building a Date Formatter - Step 14
Previously, we have to know topics about DOM with javascript and HTML.
First we have the element called currentDateParagraph, then the step asks us to assign the value of formattedDate as the text of that element, so we have to use the property of elements called textContent to do that, as I show in the code below…
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
const formattedDate = `${day}-${month}-${year}`;
currentDateParagraph.textContent = formattedDate;
//It means that we assign the formattedDate value to the text content of currentDateParagraph.
// User Editable Region