📢
5
c/coding-for-beginners•the_felixthe_felix•2mo ago

Hot take: I spent a whole weekend trying to make a simple button in JavaScript and it broke my whole page

I was following a tutorial on freeCodeCamp and typed 'document.getElementByID' instead of 'getElementById' (the 'd' is lowercase). The console gave me a weird error about something being null, and I spent like 6 hours checking everything else before I saw it. It taught me that coding is super picky about spelling, way more than I thought. Has anyone else lost a ton of time to a single typo?
3 comments

Log in to join the discussion

Log In
3 Comments
the_sam
the_sam2mo ago
My linter catches those lowercase typos instantly.
2
patel.daniel
patel.daniel2mo agoTop Commenter
Man, @the_sam, my linter saves me from that same embarrassment daily.
1
sage787
sage7872mo ago
Linters are great but sometimes you gotta learn the hard way. That pain of finding a tiny typo after hours makes you check your code twice forever.
2