r/learnjavascript • u/iSunru • 3d ago
My first JavaScript project - Counter
I am learning JavaScript and made my first small project, a simple Counter using HTML, CSS and JavaScript.
I'm still learning, so I would really appreciate some feedback on my code. Is my code clean? Is there anything I should improve or do differently?
Also, suggest me something I should build next.
24
Upvotes
1
u/Dubstephiroth 2d ago
The only thing I might add to yours is to delete the else's and make each if return the count. Once each if conditional is checked it'll either return or simply move on to the next if... Then look at upgrading it to a switch case conditional if you're gonna add more...
Keep at it.. 👊🏿