Skip to content

frankbai2024/Digital-Clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Building a Digital Clock with JavaScript

Objective:

Create a real-time digital clock that updates every second. Use JavaScript to display the current hours, minutes, and seconds dynamically. Format the time properly in HH:MM:SS format.

Key Learning Points:

✅ Use JavaScript’s setInterval() to update the time continuously.

✅ Learn how to manipulate the Date object (new Date()) to get the current time.

✅ Understand DOM manipulation to display dynamic content.

Challenge Tasks:

💡 Add a 12-hour format toggle (AM/PM).

💡 Show the current date below the time.

💡 Implement a dark mode/light mode switch. image image

About

a digital clock could be switched between 12/24H, light/dark mode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors