Kinda off-topic, but here I have 2 sources that I suggest you use.
The first, called JSHint, is based off JSLint, and is a helpful debugger. I enjoy using it more than the Codecombat debugging system (Sorry!). I am not sure, but there may be similar things for different (programming) languages. It has saved me many a hour spent on growling and keyboard pounding in a rage.
The second is JSBeautifier, and it is to make your code pretty, as the name suggests. I like to use it before I post in the Discourse, so my code looks decent. Keep in mind that it does add some extra lines sometimes.
This post might be against the Discourse rules, so feel free to remove it if is not up to standards.
Hopefully I save you guys some time!