githubEdit

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 (run itarrow-up-right)

  2. With const ❌ (run itarrow-up-right)

let

  1. Without let (run itarrow-up-right)

  2. Loops with var (run itarrow-up-right)

  3. Loops with let (run itarrow-up-right)

template strings

  1. Without Template Strings - Simple Concatenation (run itarrow-up-right)

  2. With Template Strings - Simple concatenation (run itarrow-up-right)

  3. Template Strings - Email (run itarrow-up-right)

  4. Template Strings - HTML (run itarrow-up-right)

Default Parameters

  1. Default Parameters (run itarrow-up-right)

  2. Default Parameters with Objects (run itarrow-up-right)

Arrow functions

  1. Regular Function (run itarrow-up-right)

  2. Arrow Function (run itarrow-up-right)

  3. Arrow Function - Multiple Args (run itarrow-up-right)

  4. Multiple Args - One Line (run itarrow-up-right)

  5. Arrow Functions with if statements ❌ (run itarrow-up-right)

  6. Arrow Functions with errors ❌ (run itarrow-up-right)

  7. setTimeout ❌ (run itarrow-up-right)

  8. setTimeout with .bind (run itarrow-up-right)

  9. setTimeout with Arrow Function (run itarrow-up-right)

  10. setTimeout with 'this' problem ❌ (run itarrow-up-right)

  11. Showing 'this' problem (run itarrow-up-right)

Objects and Arrays

Destructuring Assignment

  1. Destructuring Assignment (run itarrow-up-right)

  2. Destructuring with Arguments (run itarrow-up-right)

  3. Destructured Object Arguments (run itarrow-up-right)

  4. Destructuring Arrays (run itarrow-up-right)

  5. Destructuring with Comma Placeholders (run itarrow-up-right)

Object Literal Enhancement

  1. Object Literal Enhancements with Functions (demoarrow-up-right, codearrow-up-right, binarrow-up-right)

  2. Literal Enhancements: The Old Way (demoarrow-up-right, codearrow-up-right, binarrow-up-right)

The Spread Operator

  1. Spread Operator with Arrays (run itarrow-up-right)

  2. Array Destructuring with .reverse() (run itarrow-up-right)

  3. Spread Operator with Destructuring and .reverse() (run itarrow-up-right)

  4. Destructuring and the Spread Operator (run itarrow-up-right)

  5. Directions Functions (run itarrow-up-right)

  6. Spread Operator with Objects (run itarrow-up-right)

Promises

  1. getFakeMembers (run itarrow-up-right)

  2. fetch members (run itarrow-up-right)

ES6 Class Syntax

  1. The Constructor and the Prototype (run itarrow-up-right)

  2. Class Inheritance (run itarrow-up-right)

Last updated