Skip to content

Instantly share code, notes, and snippets.

@ecuageo
Created April 3, 2017 18:16
Show Gist options
  • Save ecuageo/c576b8a75923da7eaaa958f5e669a9ef to your computer and use it in GitHub Desktop.
Save ecuageo/c576b8a75923da7eaaa958f5e669a9ef to your computer and use it in GitHub Desktop.
JS topics

Javascript Mastery

Basic Language Features

conditionals, looping, comparison operators, object, arrays, etc

Except Arrays

  • attribute selector (dot or array syntax)
  • in operator

own property?

Truthiness and Automatic Conversions

  • type conversions true == '1'
  • === true === '1'
  • NaN, undefined, null

function scopes or "this"

Clojures and Contexts

  1. functions are the only scope barrier
  2. pulling scope into a
  3. show example of pulling state in
  4. encapsulation
var counter = function() {
  var count = 0;
  var inc = function() {
    count += 1;
    return count;
  }
  var dec = function() {
    count -= 1;
    return count;
  }
  return [inc, dec];
}

Higher Order functions and Composition

difference between var myFunc = function() {} and function myFunc() {} and lifting

  • Functions are values
  • Functions can have their context or "this" changed
  • currying with bind

Prototype Inheritance

  • late binding of calls, to inheritance chain
  • Object.getPrototypeOf()
  • Constructor.prototype
  • Object.create(prototype)
  • Parent.call(this, arguments)

tool-chain

  • npm or yarn
  • webpack - precompiler(babel, jsx, erb, etc)
  • webpack - commonjs, amd modules
  • brower plugins

frameworks

  • underscore
  • immutable
  • react/redux/router

Learning Paths:

the language - http://eloquentjavascript.net the toolchain - npm, es6, webpack(commonjs, amd) frameworks - react, underscore, immutable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment