§5.4.

Learning a language

It takes a long time and significant effort to master a complex programming language such as JavaScript. Fortunately, it only takes a short time to become productive in JavaScript.

I find it useful to think about learning a programming language as an ongoing journey, rather than something that you need to finish:

  1. At first, it is enough to focus on whether code runs at all. It isn’t helpful to feel stressed about the language. It isn’t necessary to have mastered all the details or even any of the details. Instead, it helps to look at the big picture and pay attention to surprising or interesting aspects of the language.

  2. With growing confidence, the next step is to use the interpreter to do experiments. Use the Node.js interactive shell to test ideas about the language (e.g., does NaN == NaN and what about NaN === NaN?). Online technical talks about the language can provide broad insights into the aspects of the language that you didn’t realize you didn’t know. [1]

  3. Then, moving into mastery, the detailed technical documentation on the Mozilla Developer Network and the ECMAScript standards [2] can help you understand all the details of the language.

  4. Finally, perhaps many years in the future, if the language becomes a long term personal passion, it is possible to contribute back to the language. Such contributions could be to language implementations (e.g., becoming a Node.js developer) or by joining the technical committees at ECMA to improve the JavaScript standards.

No matter where you are on the journey, your goal should always be simplicity and clarity. It can be a temptation to write code that uses obscure details of the language. Beautiful code should be something that even a beginner can understand.


1. The Johari window is one way to think about this process of identifying knowledge that is known to others but unknown to oneself.
2. The older standards are often easier to read than the newer standards, so they can be a better place to start.