I get the date but starting with the day and I need to get it starting with the year. What should I do?
const hoy = new Date();;
document.write(hoy.toLocaleDateString());
I get the date but starting with the day and I need to get it starting with the year. What should I do?
const hoy = new Date();;
document.write(hoy.toLocaleDateString());
You can try this way: