This might still be low-hanging fruit, but learn how to test specific modules, learn how to quickly identify which module is at fault, and learn to map your own common mistakes, as well as also mapping those mistakes where you spend 2 hours and feel like a fool for not catching it in 5 minutes.
More concretely, make small changes, test them, then make another small change.
Also, especially for javascript, I cannot stress enough the value of having even a basic reversion control system of "copying the folder and renaming it after each major stable milestone". I have saved myself hours of debugging by just reverting a module of code to a known-working version and writing the code change a second time (usually this time without whatever stupid mistake I made)
I seem plagued by a tendency to leave off a semicolon or to do "if (x=5)" instead of "if(x==5)", which often leads to very annoying sessions of bug hunting in Javascript. I also code using nothing but notepad, though, so I don't have tools which will catch silly mistakes like this. Having a proper IDE might make some of this advice less relevant (that said, I love coding in Javascript + notepad specifically BECAUSE it hones all of these skills - I can debug completely unknown code from my co-workers extremely fast thanks to a couple years writing games under these restrictions :))
learn how to test specific modules
Could you tell me more about this -- what is the best method and tool for unit testing in JavaScript? In Java I use JUnit for the non-GUI parts, and the GUI parts I simply don't test... perhaps I should test them too, but in my programs most of complexity is in the non-GUI parts, so if I test them, most of the work is covered.
JavaScript feels more integrated with the GUI (the browser). In theory, it is an independent language, which can be embedded in browser or in anything else, and all the browser stuff is just like a...
This is the bimonthly 'What are you working On?' thread. Previous threads are here. So here's the question:
What are you working on?
Here are some guidelines: