This exercise was all about learning JavaScript. In this exercise I was assigned the task to create a nice-looking HTML page with some CSS for a business of any kind.
The objective was to learn how to manipulate the DOM with JS. My first task was to create two columns: one with a table with opening hours, and the second with a short paragraph describing if the business was open or closed according to the business hours.
Then the JavaScript came into play. I was tasked to
- have JS reference the current time and, based on the result, display in the second column's paragraph if the business was open or closed.
- Display a digital clock that updates based on the current time.