Skip to content

GatoSnake/es6-examples

Repository files navigation

ECMAScript 6 (ES6) examples

This project shows the example of all the features of ECMAScript 6. The examples were based on examples from the site http://es6-features.org.

All credits are for http://es6-features.org.

The documentation with the examples can be found here.

How to run

To run the examples you need to have npm installed.

  1. Run npm install
  2. Run gulp
  3. Open in browser the file index.html
  4. Open the developer tools in your browser and look the console.

Examples

  • Constants
    • Constants
  • Scoping
    • Block-Scoped Variables
    • Block-Scoped Functions
  • Arrow Functions
    • Expression Bodies
    • Statement Bodies
    • Lexical this
  • Extended Parameter Handling
    • Default Parameter Values
    • Rest Parameter
    • Spread Operator
  • Template Literals
    • String Interpolation
    • Custom Interpolation
    • Raw String Access
  • Extended Literals
    • Binary & Octal Literal
    • Unicode String & RegExp Literal
  • Enhanced Regular Expression
    • Regular Expression Sticky Matching
  • Enhanced Object Properties
    • Property Shorthand
    • Computed Property Names
    • Method Properties
  • Destructuring Assignment
    • Array Matching
    • Object Matching, Shorthand Notation
    • Object Matching, Deep Matching
    • Parameter Context Matching
    • Fail-Soft Destructuring
  • Modules
    • Value Export/Import
    • Default & Wildcard
  • Classes
    • Class Definition
    • Class Inheritance
    • Class Inheritance, From Expressions
    • Base Class Access
    • Static Members
    • Getter/Setter
  • Symbol Type
    • Symbol Type
    • Global Symbols
  • Iterators
    • Iterator & For-Of Operator
  • Generators
    • Generator Function, Iterator Protocol
    • Generator Function, Direct Use
    • Generator Matching
    • Generator Control-Flow
    • Generator Methods
  • Map/Set & WeakMap/WeakSet
    • Set Data-Structure
    • Map Data-Structure
    • Weak-Link Data-Structures
  • Typed Arrays
    • Typed Arrays
  • New Built-In Methods
    • Object Property Assignment
    • Array Element Finding
    • String Repeating
    • String Searching
    • Number Type Checking
    • Number Safety Checking
    • Number Comparison
    • Number Truncation
    • Number Sign Determination
  • Promises
    • Promise Usage
    • Promise Combination
  • Meta-Programming
    • Proxying
    • Reflection
  • Internationalization & Localization
    • Collation
    • Number Formatting
    • Currency Formatting
    • Date/Time Formatting