- Date() gives a chance to get hours, minutes, seconds etc.
const now = new Date(); seconds = now.getSeconds(); minutes = now.getMinutes(); hours = now.getHours()
- transform-origin vs transform:rotate() The first one sets the point around which the transformation takes place. Rotate() is driven by center of the element. More about MDN transform-origin.
JavaScript30—Day 2
JavaScript30 is 30-day vanilla javaScript coding challenge by Wes Bos (@wesbos).
The purpose of these posts is to reflect my troubles and moments of ahhaa.
Lessons from Day 2 — CSS-JS clock:
Demo - Day 2