JavaScript Clock 🕒

This is a real-time analog clock built using HTML, CSS, and vanilla JavaScript. It reads the current time using the JavaScript Date object and updates the clock hands using CSS transforms.

Clock screenshot

Code Sample

const now = new Date();
const seconds = now.getSeconds();
const secondsDegrees = ((seconds / 60) * 360) + 90;
secondHand.style.transform = `rotate(${secondsDegrees}deg)`;

What I Learned

🔗 View project Live Demo
← Back to portfolio