Skip to content

Task: Create an Example Solution for a Live Digital Clock #318

@sumn2u

Description

@sumn2u
Image

📝 Description

We need a working example solution for a Live Digital Clock that displays the current time in hours, minutes, and seconds.
The goal is to help beginners understand how to build real-time UI updates using JavaScript.


🎯 Requirements

  • Display the current time in hours, minutes, and seconds
  • The clock should update automatically every second
  • Include a toggle between AM/PM and 24-hour format
  • Make the interface responsive and visually clean

💡 Concepts to Demonstrate

  • Using the JavaScript Date object
  • Using setInterval() for real-time updates
  • DOM manipulation to display the time
  • Formatting time strings properly

🚀 Bonus Challenge

  • Add support for different time zones
  • Add an optional stopwatch or countdown timer

📦 Deliverables

  • A working example using HTML, CSS, and JavaScript
  • Include a short explanation (in comments or README) describing how your code works
  • Submit your solution as:
    • A pull request in the examples/ folder
    • Or attach a CodePen, JSFiddle, or GitHub Gist link

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions