Skip to content

Instantly share code, notes, and snippets.

@shamansir
Created August 2, 2012 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shamansir/3234248 to your computer and use it in GitHub Desktop.
Save shamansir/3234248 to your computer and use it in GitHub Desktop.
Mastering True JavaScript

Functions

Structure

Function is Block

Anonymous Calls

In-place Calls

Anonymous In-place Calls

this

Methods vs. Functions

Local Functions

Cheating with this (call and apply)

Closures

Prototyping

Approach

Dynamic Types: Pros and Cons

Fields / Properties

Prototype

The Holy New

Methods

this

Static Methods

Extending Types — evil or not?

Mastering Functions

Pure Functions

Lambdas

Modules

Recursion

Magic Comma

Looping

Advanced Looping

Iterators / Collections

Generators / Yielding / Ranges

Map / Reduce

Return Values From Loops

Visiting Structures

Walking / Travelling through Trees

Graphs

Decorating

Validating Parameters

Mighty Match instead of Switch

Combinating

Chaining

Logical Chaining

Paritally Defined Functions

Currying

Deferring

Chains of Deferred Functions

Y-Combinator

Monads

Event Bus

Parameters

Named & Default Params

Patterns

Factory

Observer

Other Patterns

Mastering Objects

Immutability

Cloning

Types and Strictness

Duck Typing

Interfaces

Mixing In and Traits

Constructors & Methods

Validation

Abstract Methods

Overriding

Combinators

Below are the different fancy code blocks


function(x) {
  function_b();

  foo();

  var a; while (i--) {}
}

function(x) {
  function_b();

  foo();

  var a; while (i--) {}
}

function(x) {
  function_b();

  foo();

  var a; while (i--) {}
}

function(x) {
  function_b();

  foo();

  var a; while (i--) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment