This question appears to be off-topic. The users who voted to close gave this specific reason:
Here are some things that have brought me pain so far:
It's Interpreted, not compiled. That means that you will find many of the errors only at runtime. And it might happen that your code to executes only partially when you have an error.
This is a big topic, and I'm sure the answer is not complete, so I invite others to edit it.
Do you know Design Patterns?
Namespace (Module) Pub-Sub (Observer).
JS is flexible because it doesn't have a class.In JS... it is all just objects, at runtime - operating on the DOM(important). JavsScript objects are essentially one in the same to the notion of JSON, 'discovered' by Douglas Crockford. He is one expert.
MVC is also super important in my humble opinion. I like backbone.js there are others.
It is a great language highly recommend it! It has been great since my transition from c++; and sure do miss arduino.