I want to choose JavaScript as my main development field, alongside HTML and CSS to become a developer commonly known as front-end developer. But I don't know how to become a JavaScript professional. I've read many books and learned the pieces including data types, syntax, tools usage (like IDEs, Debuggers, etc.), jQuery, etc. But when I look at some sophisticated JavaScript codes including famous libraries, I'm like "I never could write that code". What's wrong here? What step should I had taken that I didn't? I feel I'm missing something here to become a professional JavaScript developer. I also watched training movies, including Douglas Crockford's movies at Yahoo Theater.

  • 23
    Can we assume you already have the outfit?
    – JeffO
    Jul 23, 2011 at 20:20
  • What a mind boggling decision... shakehead
    – ThomasX
    Nov 2, 2011 at 7:35
  • 1
    DOM Scripting, the book. Then start reading John Resig's stuff and learning it well enough to see the point of what they did with jQuery's architecture. It's basically an adapter/decorator factory function for the DOM taking heavy advantage of the function closure to keep jquery objects as lightweight (in memory) as possible. Come back and read that sentence occasionally as you learn new stuff until it makes sense. Oh, and don't use IDEs. Not until you're competent without one and can make an informed decision. Jul 5, 2013 at 22:23

12 Answers 12


Your answer is experience. I'm afraid there is no other way to become good at it without practise. Try and create similar libraries to the ones you've looked at as an exercise. Keep reading but practise, practise, practise!

  • 3
    +1 for experience, I'm afraid. There's really no other way. If you can't get it at work, either do some pet projects at home, or get involved in open-source software. Even fixing tiny bugs in a JS library you admire will be a massive learning experience.
    – Tom Morgan
    Jul 23, 2011 at 14:19
  • 1
    Thanks @Gary. I just wonder maybe there is some techniques to make that practicing process faster. Or maybe there are some shortcuts, like some JavaScript concepts many developers are not familiar with. Jul 23, 2011 at 14:20
  • 2
    @SaeedNeamati there are some books, like the Good Parts. I would also recommend stackoverflow involvement. I learned a lot from answering javascript questions
    – Raynos
    Jul 23, 2011 at 14:26
  • 1
    @Saeed Neamati - Try something that you might think is out of your current limits. You may surprise yourself how far you get. The best learning experiences i've had are when i'm a bit out of my depth and had to do some research and learning to continue with the project. Jul 23, 2011 at 21:43
  • Lt. Aldo Raine: "You know how you get to Carnegie Hall, don't ya? Practice. "
    – MattyD
    Nov 2, 2011 at 0:23

"I never could write that code"

Really? Try it first.

  • 2
    This is very good advice! Give it a try and learn the bits you don't yet know. That's how you grow. Jul 23, 2011 at 21:44
  • They couldn't write the code either until they did it.
    – Yatrix
    Nov 1, 2011 at 20:34
  • And 6 or 12 months into Javascript you'll look back at your first steps and think 'man, how amateur is that'. Practice.
    – Alan B
    Nov 2, 2011 at 10:28

Funny you should phrase your question this way. Most books on basic javascript do not help you understand why and how certain aspects of JavaScript should be used in order to achieve great code. What really REALLY helped me understand the more advanced side of JavaScript as well as best coding practices were the writings of John Resig, the lead engineer of JQuery.



Pro JavaScript Techniques

Secrets of the JavaScript Ninja

These help you understand how advanced JavaScript features should be used and why. You may also want to read up on Patterns and Agile Principles, and in particular the writings of Martin Fowler for more generalized thoughts on best coding practices.

  • 1
    I think you really answered the question and provided much better advice than "just do it". Thank you for providing these resources. Jun 23, 2013 at 15:05

You have to program ... a lot.
Study the source code of projects like jQuery, Node.js. Add CoffeScript or ClojureScript to your arsenal.
Have a look at JavaScript MVC or Backbone.js.

Check what Google Closure brings to the table.
And of course, bookmark Mozilla Developer Network.

  • 4
    CoffeeScript and ClojureScript have their place but they in don't help you learn javascript, at all.
    – Raynos
    Jul 23, 2011 at 22:58
  • 1
    Yes I know, that is why I said: Add CoffeScript or ClojureScript to your arsenal. It is nice to know about these two technologies.
    – Chiron
    Jul 24, 2011 at 1:18

If you chose this field, be prepared to be paid less and be considered less professional/good than c/c++/c#/java/etc.

This is usually the case, especially in terms of salaries. It's very easy to find really good js + html + css coders, but it's kind of hard to find really good c/c++/c# programmers. This is the problem the company I work for (around 300 employees) is facing now. Even students having a good grasp of the mentioned languages were paid better than seasoned JS developers.

Most JS devs learn from tutorials from the internet, and participate in open-source projects, which is quite a good thing - maybe find some FOSS project which uses JS heavily (front-end development for gnome 3, to give you an example) and contribute to it. This way you can gain some experience with the tools and languages.

Besides, find some good rated books on Amazon and read them. But remember, CODING is the way you learn, so start developing, besides reading ;)

  • 1
    It seems to me like it's easy to find bad js/html/css developers who can hack together an unmaintainable mess quickly. Good developers are still hard to find. Sep 22, 2011 at 14:34
  • 1
    A good front end guy is probably more dear than the back end guys -- there really is a lot more voodoo going on up there and that world is changing loads faster than the back-end. Nov 1, 2011 at 20:58

I agree with what was said above, you just need practice. It's also important to understand the design patterns used in high-end javascript code. I think once you understand the patterns used and why they used them, it may become a lot clearer. Pro JavaScript Design Patterns by Harmes and Diaz is a good start. Also take a look at Osmani's Essential JavaScript Design Patterns For Beginners.


Ninja's are normally just farmers or peasants dressed up in simple but sneaky identity disguising garb. But what makes a simple person a true ninja is a meaningful objective, pulling it off and then not getting killed themselves. So with that in mind why don't you find a javascript samurai demon, sharpen you coding katana and see if you can take the badboy down without killing yourself. If you succeed you'll make the world a better place for the other code farmers and find that you've become a ninja in the process. That or you'll be dead.

Good luck!

  • also - most ninjas suck and got killed quite fast - but those that survive - become living legends ;)
    – c69
    Dec 5, 2011 at 20:24

I wouldn't call me a master in javascript, but pretty good anyway. Read, understand and code from like these books:



That would cover the basics. Then explore the whole field. Try to learn as much as possible. Learn to debug code in Firebug. Learn a couple of javascript frameworks (somewhat decently) - Jquery being the easiest. Maybe Dojo toolkit, Mootools and Prototype. Try to read and understand the source code of javascript frameworks. Build a plugin in jQuery. Learn the Module pattern. There's a lot to learn..

But the most important rule of them all is:

Code and try to better yourself every day!

And don't just become a framework junkie who needs the latest plugin or framework to do anything good. Try to master the core language and do plugins or widgets from the ground up yourself. If you can't do that, then you ain't not great yet.


Definitely practice - but, IMHO, it's better not just to do busy work for practice; find a real problem to solve. Think of something cool to accomplish, and go write it. Find someone who want some javascript work done either for free (like for a charity or non profit) or for way cheap, and write code for them. In other words, your best pratice will occur doing something meaningful.

Also - I think javascript is a really interesting and actually very powerful language - but I learned more about programming in general in the college C class I took years ago than from any one source before or since. Learning C came with learning about how computers think, about memory in bits an bytes, and I had a pretty decent teacher who emphasized some really solid foundational programming practices. The guy that said learn another language weren't completely wrong - learning another langauge changes your view of programming a bit and makes you appreciate the similarities and differences.


The javascript code you find in a typical web application is fairly easy, especially if you use a framework like jQuery. Writing custom plugins is a little more advanced, but still only requires a few basic concepts. This is enough for most purposes - in enterprise environments you can really impress clients with a few simple techniques from internet development because the existing UI is usually awful - but not really ninja level.

If you want to really know javascript, you need something a bit more challenging where you will run into limitations of the system and be forced to apply more advanced techniques. You can find some of this sort of code in frameworks that have to deal with browser compatibility, but this is largely a solved problem, as well as being rather frustrating to work with. There are a lot of more interesting options around html5 apps - try to implement something that would not normally be done in a browser.

My own example of this is a git client. Javascript doesn't handle binary data very well, and the naive implementation locks the UI for several minutes and allocates new objects fast enough to run out of memory before GC is triggered. Optimizing something like this leads to learning exactly what happens when the code is run, and since this understanding is impossible with poorly structured code you will learn to write javascript with a clear structure that is applicable to more typical applications as well.


Practice in the field and JQuery. This is the best advice I can give.


Don't learn JavaScript as your first language, and don't try to emulate the programming style that you find in JavaScript libraries. Most JavaScript programmers are hacks who gave me up on real programming languages like C++, C, Java, etc. The result is that their JavaScript code is a jumble of uncommented, undecipherable spaghetti code. I know, because I worked as a C++/Java/C# software engineer and am coming into the JavaScript world now.

So if you want to be a great JavaScript software programmer, go learn some other programming languages first and then come back to JavaScript.

  • 4
    Your implying "C++, C, Java" are better languages then JavaScript. Your implying that JavaScript is the problem. These are all false statements.
    – Raynos
    Jul 23, 2011 at 22:59
  • 4
    I think you are failing to see the vast functionality of javascript, and what that language is capable of...
    – user29981
    Jul 24, 2011 at 1:01
  • @stackoverflowuser2010 That's false. I'm sure C++ and PHP have just as many unskilled programmers hacking away not knowing what they are doing as JavaScript. Admittedly the barrier to entry for js is lower. However the solution is to learn JavaScript not to go learn some superior language. And whilst we're talking about superior languages, one should go learn Self instead. That will aid learning JavaScript the most
    – Raynos
    Jul 24, 2011 at 9:53
  • 2
    Most programmers suck -- in any language. The difference with JavaScript is that you can view source and see it. Sep 22, 2011 at 14:36
  • 1
    -1: Just a unsupported rant. Nov 1, 2011 at 23:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.