Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Don’t beat yourself up over it.
...Here! Have some extra semicolons for when you forget those, too.
;;;;;;;;;;;;;;;;;;;;;;;;;;;; -
lxmcf199507y@BrainDrain haha, was just so annoyed at myself for such a simple mistake...
And ahhhh, can never have too many spare semi colons -
I think vscode automatically shows not known function names, though not sure if via plugin or default, you could try it next time, to avoid hunting it so long 😄
-
Glinkis2227yIf your editor doesn't make a red squiggly when trying to access things that don't exist, you need to look over your tooling.
-
Glinkis2227y@host127001
Well, it depends. For the DOM, like in the OP's example, you should be able to get the editor to help you out
And for the rest you can use jsdoc comments, which allows many editors to reason about your javascript. -
@host127001 in addition to @glinkis comment, if you use flow or typescript then your ide can be even more helpful.
-
Glinkis2227y@destriaero
I do use Typescript, and perhaps that's the reason I find things like this out of the ordinary. -
@lxmcf It had to be a plugin then it seems, wish I knew which one it was, as I had tons of them installed before I had to reinstall windows
-
lxmcf199507y@JoshBent damn, I'll have to hunt one down, really hate not having proper error highlighting in vs code itself, oh well, I'll live haha
Just spent 2 fucking hours debugging one of my websites scripts because apparently appendChild wasn't a function... Here I was thinking there was a function called getElementByClassName... Dick head me didn't realise I'm missing a single 's'... 2 hours over a single fucking s!
Fuck javascript man...
rant
javascript can suck an ass