JavaScript Learning Resources

by Zach Briggs


(added 9/27/2013) JavaScript The Good Parts Book and Video :
I like Eloquent JavaScript and Secrets of the JavaScript Ninja, but they are both twice as long as they need to be. The Good Parts is a little dated, I don't agree with all of the opinions, but I've still not seen a better book for people coming to JavaScript from another language. 

Effective JavaScript Book and Podcast
This is the reference guide. The manual that should sit by your desk at all times just in case you need it. I'm sitting here typing right now and fighting down an anxiety attack because my copy is packed away in preparation for our move and NOT by my desk. It's comprised of 68 small tips that will make your code delightful to behold.

Small Plates:

  • Scope
    There are many rules to the way scoping works in JavaScript. The two that you should never forget are that omitting var will create an accidental global variable and that the only way to create a new scope is inside of a function.
  • This
    Understand very deeply that when you see this in JavaScript that you have no idea what it's referencing, just like you have no idea what an argument is referencing until a value is passed in upon invocation. That's because unlike self in other languages, this IS an argument.
  • Prototypal Inheritance
    Prototypical Inheritance is less important than you may think considering that JavaScript is often identified by this single feature. Understand it so that JS's method dispatch makes sense and then try to avoid deep object graphs. Cat really doesn't need to be an instance of Animal. Seriously.
  • IIFE's and closures
    Nailing the IIFE (pronounced "iffy") and the closure it creates is probably the most important step to creating reusable JavaScript components. 
  • Style Guide 
    Be mindful of the code's style. This one isn't the single source of truth, but it's as good as any to get started with.
  • Modules
    No matter what anybody tells you, do not use a library like require.js as a beginner. If you're advanced enough to understand the tradeoffs, then by all means.
  • Testing
    Yes, testing in JavaScript is just as important as any other language.