The goal of this project is to demonstrate my understanding of basic JavaScript concepts such as variables, functions, and objects. I will also learn how to use JavaScript to manipulate the DOM and create interactive web pages.
-
Open the
animated-clock
folder in VS Code and open theindex.html
file in your browser. -
You should see a clock with a second hand, minute hand, and hour hand.
-
My task is to make the clock animated so that the hands move in real time.
-
I can also try to incorporate the ticking sound effect from the media folder.
-
For this task, I will need to edit just the script.js file.
-
Hint: Look up the Date object in JavaScript.
-
Hint: Look up the Audio object in JavaScript.
-
Hint: Look up the setInterval method in JavaScript.
-
Hint: Look up the setTimeout method in JavaScript.
-
Hint: Look up the transform property in CSS.
-
Hint: Look up the transform SVG attribute in SVG.
If you need help with any of the concepts covered in this project, here are some resources that might be useful:
๐Good luck!
- Here is a GIF of the expected result: