Things to learn in Javascript

Monday, Nov 28, 2011

I came across this post that has some suggestions about how to judge your proficiency in Javascript. I’m always looking for ways to find out what I don’t even know that I don’t know, so I found it helpful as a checklist to start working my way through. It seems like I know several things at each level, and I figure that’s probably how most people are.

A basic level of understanding for JavaScript includes:

  • Knowing the syntax of basic programming tools such as loops, if statements, try/catch, etc.
  • Understanding function definitions including the various ways they can be defined and assigned, as well as anonymous functions
  • Understanding basic scope principles, global (window) scope versus object scope (closures excluded)
  • Understanding the role of context and the use of the ‘this’ variable
  • Understanding the different ways to instantiate and declare an object as well as functions as objects
  • Understanding JavaScript comparison operators like ’<’, ’>’, ‘==’, ‘===’, what is falsy, and how object and string comparison works, as well as casting
  • Array indexing for object attributes and functions and how this differs from actual arrays (object literals vs. array literals)

An intermediate level of understanding includes:

  • Understanding timers, how they work, and when/how they can be useful as well as asynchronous method execution
  • In depth knowledge on callbacks and function application such as the ‘call’ and ‘apply’ methods for controlling context and function argument passing
  • Understanding JSON notation and the ‘eval’ function
  • Understanding closures, how they affect the performance of your code, and how they can be used to create private variables, along with the lovely (function(){})() call
  • AJAX and object serialization

An advanced level of understanding includes:

  • Understanding a methods ‘arguments’ variable and how it can be used to overload functions through arguments.length and make recursive calls through arguments.callee. It should be noted that use of arguments.callee can be dangerous as ECMAScript 5 Strict Mode doesn’t support it, although both jQuery (up to 1.4) and Dojo take advantage of it.
  • Advanced closures such as self-memoizing functions, currying, and partially applied functions
  • Function and html prototyping, the prototype chain, and how to use base JavaScript objects and functions (e.g. Array) to minimize coding
  • Object type and the use of instanceof and typeof
  • Regular expressions and expression compiling
  • With statements and why you shouldn’t use them
  • The most difficult part of all, knowing how to tie all these tools together into clean, robust, fast, maintainable, and cross browser compatible code.

-Michael Woloszynowicz