Javascript: The Good Part

Chapter 1. Good Parts

Analyzing Javascript

Function.prototype.method = function (name, func) {
    this.prototype[name] = func;
    return this;
};

Chapter 2. Grammar

Whitespace

Names

Numbers

Strings

'c' + 'a' + 't' === 'cat'

Statements

function myFunction() {
  var privateVariable = "private";
}