Challenge: Run Code on Element Initialization: x-init
Challenge yourself by writing code to update the clock in realtime.
We'll cover the following
Challenge yourself
The code below is a clock that’s supposed to update in real time. Though getTime
sets time
to the current time, it doesn’t update the clock. Add the missing code to complete the execution. You must use x-init
to achieve the expected results.
Get hands-on with 1200+ tech skills courses.