Event Announcement
JavaScript
20 pts
Event Announcement
Write formatEvent(date) that returns text like
Thursday 15 January 2026, 09:05
— weekday name, day (no leading zero), month name, year, a comma, then the time as HH:MM with two digits each. Use the arrays DAYS and MONTHS, the getters and padStart (not toLocaleDateString). Expected output:
Thursday 15 January 2026, 09:05 Tuesday 1 September 2026, 14:30
Checklist
- Keep the function
formatEvent. - Show the weekday, day, month name and year.
- Add the time as
HH:MMwith leading zeros. - Use getters, the arrays and
padStart(). - Print the two announcements.
🔑 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.
