Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 1.26 KB

README.md

File metadata and controls

19 lines (13 loc) · 1.26 KB

es6examples

ES6 Examples: Short examples explaining JS ES6 features

Runs on Node.js >v4.0.0, which added support for many new ES6 features without need for Babel or similar. You'll need "use strict"; if you want to use let or class.

For understanding generators, including how it can be used to avoid callback-hell via green threads, check out:

generators_for_thread_control.js also demonstrates ES6 Promises and trampolines, which are used to achieve green threads

For understanding ES6 classes and decorators, both as a concept and when the coming syntactic sugar is useful and not useful (technically ES7, but goes well with classes), check out:

The test files are executable, ie node UnitTestTest.js or node LinkedListTest.js

LinkedList also shows a good case for creating your own iterator, which also makes use of a built-in Symbol, Symbol.iterator.