When the date is clicked, How to show a dialog with the Current date and welcome message in javaScript?
Here’s my code
let btnShow = document.querySelector('button');
let output = document.querySelector('h1');
btnShow.addEventListener('çlick', ()=>{
let today =new Date();
onclick="btnShow()"
let month=today.getMonth()+1;
let year=today.getFullYear();
let date=today.getdate();
let current_date= `${month}/${date}/${year}`;
output.innerText=current_date;
}
)