Day/Month/Year
JavaScript
10 pts
Day/Month/Year
Finish formatDate(date). It returns the date as DD/MM/YYYY, with two digits for the day and the month (use getters and padStart). Expected output:
05/01/2026 23/11/2026
Checklist
formatDatereturns day/month/year with the right month number.- Day and month always have two digits.
- Use getters and
padStart(). - Print the two formatted dates.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
