Why JavaScript is so difficult to learn

I have been a web developer for more than 3 years. In the process I have learned HTML/XHTML, CSS, Ajax, PHP, MySQL and a few things about HTTP and Apache. And overall this has been a fairly smooth experience. But, for some reasons that I have had troubles to pinpoint up to now, JavaScript is the language that has been difficult to learn.

Blaming it on awkward constructs misses the point

For a while I have been blaming that on some unique JavaScript features such as closures or JavaScript Object-Oriented constructs. But blaming it on those is missing the point.

What makes JavaScript so difficult to use in a browser is that you need to learn much more than just a language!
To understand JavaScript, you need to know about:
- HTML/XHTML
- CSS
- browsers
- the DOM
- the BOM
- a UI platform
- 3 different event models
- web forms
- HTTP
- cookies
- Ajax

You need to learn way more than just a language

When you know all that, you can finally start learning JavaScript and its awkward constructs!
And then you’ll probably learn to use at least one JavaScript library because it will make your life much easier!
And of course you will have to worry about many other concepts such as “progressive enhancements” or “unobtrusive JavaScript”.

The worse is that I am not even kidding, you really need to understand all of the above quite well otherwise you will not make much progress in your JavaScript practice.

So, no wonder JavaScript is so difficult to learn and use well.

But here is the silverlining:
1. This is fun!
2. Once you have developed all these skills, you will have become quite valuable!

Leave a Reply