#JavaScript30 – Day 02

Day 2 of this challenge involved building a clock with moving hands using CSS and JavaScript. I don’t know how it never occurred to me to build a normal analog clock using CSS or JavaScript before, but I’m glad I got to.

I liked that this time, the instructor paused to say “try this last bit by yourself.”

The thing that I do love about tutorial courses is that even if you are just typing what the instructor is typing on screen, you can still learn something. For example, if I had done this project on my own, I probably would have made each hand a different function which is ridiculous – each hand is doing the same function at different time intervals. The entire point of creating functions is to cut down on repeating the same code after all. But it’s hard to see where your skills are becoming diluted when you never seek help, even in the form of a simple tutorial.

Here’s something else I learned from this project:


Based on only the video, my best guess about querySelector is that it’s a newer and better way to select elements. I was close, but not quite there.

While you can use querySelector in the same manner as getElementByID and getElementsByClassName, it is capable of much more. Using querySelector will let you find elements with rules that can’t be expressed with getElementById and getElementsByClassName.






2 thoughts on “#JavaScript30 – Day 02

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s