JS clock (Hour-hand problem)

https://codepen.io/codeobsession/pen/zQgNaK
The hour hand is not working

hour_hand.style.transform = `rotate(${hour_hours})`

Missing the deg there. Hope this helps!

1 Like

Oh I forget ,thanks now give it a feeback if possible

Mostly clean code. I like!

You even encapsulated everything.

If I had to nitpick, I’d say fix the CSS to follow a coding standard. https://google.github.io/styleguide/htmlcssguide.html

check out rule separation and look at the spacing between property and values.

Also,. personally would have broken that function up more into smaller pieces., but what you have is perfectly fine. I’m used to working with large projects so reusing certain parts of functions are great when broken up.

1 Like