Skip to content

Latest commit

 

History

History
 
 

readme.md

Chapter 2 : Emerging JavaScript

If you haven't made the switch to the latest JavaScript syntax yet, now is a good time to get started.

Samples

Declaring Variables in ES6

const

  1. Without const (demo, code, bin)
  2. With const ❌ (demo, code, bin)

let

  1. Without let (demo, code, bin)
  2. With let (demo, code, bin)
  3. Loops with var (demo, code, bin)
  4. Loops with let (demo, code, bin)

template strings

  1. Without Template Strings - Simple Concatenation (demo, code, bin)
  2. With Template Strings - Simple concatenation (demo, code, bin)
  3. Template Strings - Email (demo, code, bin)
  4. Template Strings - HTML (demo, code, bin)

Default Parameters

  1. Default Parameters (demo, code, bin)
  2. Default Parameters with Objects (demo, code, bin)

Arrow functions

  1. Regular Function (demo, code, bin)
  2. Arrow Function (demo, code, bin)
  3. Arrow Function - Multiple Args (demo, code, bin)
  4. Multiple Args - One Line (demo, code, bin)
  5. Arrow Functions with if statements ❌ (demo, code, bin)
  6. Arrow Functions with errors ❌ (demo, code, bin)
  7. setTimeout ❌ (demo, code, bin)
  8. setTimeout with .bind (demo, code, bin)
  9. setTimeout with Arrow Function (demo, code, bin)
  10. setTimeout with 'this' problem ❌ (demo, code, bin)
  11. Showing 'this' problem (demo, code, bin)

Transpiling ES6

Transpiling in JSBin

  1. JavaScript Tab (bin)
  2. ES6/Babel Tab (bin)
  3. Transpiling Locally (demo, code)

Objects and Arrays

Destructuring Assignment

  1. Destructuring Assignment (demo, code, bin)
  2. Destructuring with Arguments (demo, code, bin)
  3. Destructured Object Arguments (demo, code, bin)
  4. Destructuring Arrays (demo, code, bin)
  5. Destructuring with Comma Placeholders (demo, code, bin)

Object Literal Enhancement

  1. Object Literal Enhancement (demo, code, bin)
  2. Object Literal Enhancements with Functions (demo, code, bin)
  3. Literal Enhancements: The Old Way (demo, code, bin)
  4. Literal Enhancements Now (demo, code, bin)

The Spread Operator

  1. Spread Operator with Arrays (demo, code, bin)
  2. Array Destructuring with .reverse() (demo, code, bin)
  3. Spread Operator with Destructuring and .reverse() (demo, code, bin)
  4. Destructuring and the Spread Operator (demo, code, bin)
  5. Directions Functions (demo, code, bin)
  6. Spread Operator with Objects (demo, code, bin)

Promises

  1. getFakeMembers (demo, code, bin)
  2. fetch members (demo, code, bin)

ES6 Class Syntax

  1. The Constructor and the Prototype (demo, code, bin)
  2. Classes (demo, code, bin)
  3. Class Inheritance (demo, code, bin)