JavaScript image

How Long It Takes To Learn Javascript

Avatar of Damla

Is the developer and the main researcher of

1 Weeks

It took me Weeks Days to learn JavaScript

Learning JavaScript (or as often abbreviated as JS) is one of the main steps of becoming a web developer. Even though it has some ups and downs through its history, now it is widely used for both frontend and backend development. Despite all its dislikers, JavaScript managed to be the de-facto standard for client-side development. After getting Google’s and a lot more tech companies’ support JS is a very powerful language with a huge community behind it. And because of this community and support, there are a lot of resources and even dedicated sites to learn it.

Learning sufficient enough to use on a personal site

If you are going to use JavaScript to add some cool features to your personal site, there is a good chance that you can easily find some code samples to perform the tasks for you. Of course, you will need to know JavaScript enough to understand and modify the snippets. However, you probably won’t need to design a solid structure. And you will always have some frameworks, like jQuery to do the most of the job for you. If this is your case, you will learn JavaScript sufficiently in about 1 week. This should include the learning the basics of the framework, too. After this time, you should be able to manipulate your page as you wish, with a little bit of help from your framework’s documentation, StackOverflow, and the endless Web!

If you are going to create a web application

If your plans are bigger than just adding some fancy features to a personal site, you will need the true power of the JS. However, when JavaScript is the case, great power comes with great possibilities for errors and long hours of debugging. And let’s face it if you don’t know what you are doing and if you don’t have powerful tools with you, JavaScript can be a little painful because of its nature. Even the people, who advocate for learning by doing, would suggest that you should be more careful this time.

The time required for learning JavaScript for creating your own web application should be about 1 month. However, if this is your first programming language, you should probably take a look at our Learn Programming article.

Backend programming with Node.js

There has been a huge hype about asynchronous and extremely efficient backend development using Node.js. It is basically a JavaScript environment that has some extra features to manage dependencies and server related operations. Since it is almost plain old JavaScript, switching cost from frontend to backend development should be quite easy for you. Of course, its asynchronous nature may be strange for you as a first impression but it is very easy to get used to it. If you are already fluent in vanilla JS, you should be able to learn Node.js in a week. Otherwise, all the other information from the previous section is also valid for you.

Advanced JavaScript

JavaScript is a capable and flexible language. However, most of the users often criticize it for being somewhat "chaotic". Favoring asynchronicity, being a dynamically typed language and every small snippet's ability to change/crash the application's overall flow (this behavior usually called as polluting) are some of the arguments that support the chaos. Yet, JS is indispensable enough for developers to try to solve this issues.

Solutions offered for these issues are mostly not on the syntactic level. So if you want to step up your JavaScript skills, you don't necessarily need to learn more features of the language. There are some ideas that were suggested to reduce the issues.

  • AMD (Asynchronous Module Definition)

AMD is one of the common ways to achieve highly modular JavaScript applications. 

The Purpose of the AMD is to promote the modular structure in JavaScript applications. If you are planning to develop a complex web application, the chances are high that the plain old JavaScript will let you down as the number of scripts and functionalities increase. Similar to all of the development projects, it would be wise to plan your architecture before it is too late. Modular design will help you a lot to achieve an extendable and maintainable architecture. Mastering AMD will be a trivial task for anyone who is willing to read a few pages of introduction in a few hours. For more information and the complete rationale behind AMD you can read this document.

  • Asynchronicity

Regardless of the type of the application, backend or frontend, you can benefit highly from using asynchronous execution. Modern JavaScript engines, used in both browsers and server side, can parallelize the execution if it is possible. Likewise, if you, as a developer, give no chance for parallelization using blocking components, it will hurt the overall speed of your application.

Most of the blocking statements on your code can be turned into asynchronous calls using callbacks. By doing so, you tell the JS engine that you don't want to wait until that line of code executes until the process continues. However, as discussed above, introducing asynchronicity makes the logic more complex. Luckily, there are ways to reduce this complexity. Using a modular design (e.g AMD) and script loaders (e.g require.js) will help you be more structured and save you from reinventing the wheel. Practicing the best practices for a month should be enough until you are confident with them.

Also keep in mind that you don't have to do something fancy to introduce blocking parts to your application. For example, including scripts to your web page using the <script> tag is also blocking the execution until the browser send the request, get the script and execute it.

Votes given by our users:
Any Comments or Questions?