Advanced JavaScript Techniques

There's a lot more to JavaScript than first meets the eye. This course explores the language in forensic detail, shining a light on the dark areas that often confuse and confound JavaScript development teams. If you're writing production JavaScript code, and you need to get it right, then this is the course for you.


3 days



  • At least 3 months JavaScript development

What you'll learn

  • Object-oriented programming in JavaScript
  • Managing scope in a large JavaScript application
  • Understanding JavaScript gotchas
  • Using patterns to improve code quality
  • Testing techniques

Course details

Function Techniques

  • Literal functions
  • Declaration hoisting
  • Arguments and function overloading
  • Recursion
  • Managing 'this' in call-backs
  • 4 ways to invoke a function

Object-Oriented JavaScript

  • Object literals
  • Default and guard operators
  • Property attributes
  • Understanding prototypes
  • Enumerating object properties
  • Adding and deleting properties dynamically

Implementing Inheritance in JavaScript

  • Pseudo-classical, prototypal, and functional inheritance
  • Mixins
  • Overriding and super()
  • Using prototype effectively

Array Techniques

  • Literal arrays
  • Using 'length' and 'delete'
  • Using 'for' vs. 'for in'
  • Associative arrays
  • Augmenting the array prototype
  • Multidimensional arrays

Managing Scope and Namespaces

  • Lexical scope
  • Closures
  • Revealing Module pattern
  • Bind
  • Avoiding polluting the global namespace
  • Immediately-invoked function expressions (IIFEs)
  • Implementing a robust namespace factory method

Asynchronous Programming Patterns

  • Call-backs with asynchronous methods
  • Promise/future with deferrable values
  • The Observable pattern

TDD JavaScript

  • TDD essentials
  • Overview of testing frameworks
  • Using Jasmine
  • Using QUnit