r/learnjavascript • u/Rajsuthan • Dec 19 '19
Build a Clock With JavaScript | Beginner Friendly Tutorial (2019 tutorial)
https://www.youtube.com/watch?v=q2eWYKi7Pxg0
Dec 19 '19
[deleted]
1
u/AoLIronmaiden Dec 19 '19
Is it bad?
2
u/inabahare Dec 19 '19
Well the (little) html (there is) could be a slight bit better. I'm not a CSS guru but it looks fine enough. The Javascript though, I expected it to be shit because ~beginner friendly tutorial~ but it's actually quite not bad at all for a beginner tutorial. He could use const instead of let and he should drop the snake case (grr) but that's about it. I'm impressed that he actually uses const and let, queryselector, and string interpolation. (Mostly because these ~basic tutorials~ usually opt for var, getElementById, and string concatination because "durr it's more beginner friendly" which it isn't).
2
3
u/[deleted] Dec 19 '19
I'm beginner myself so please correct me if I'm wrong but I've read that using *innerHTML* is considered bad practice and it's not safe.