Design comparison
SolutionDesign
Solution retrospective
Any idea on how to create the light horizontal line on the counter boxes will be appreciated
Community feedback
- @AlexKMarshallPosted about 3 years ago
Hey there this looks good but you have a small bug in your js.
setInterval
only runs the callback after the interval is passed, so for the first 1000ms the screen just shows{time}
. It will also show the wrong thing if the JavaScript takes a while to load over the network.So you might want to set up some loading state in the initial html, and then make sure you render the time as soon as JavaScript is available. And then set up the interval
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord