- Classes
- Define with
class
keyword - Constructor function
- Methods
this
refers to instance
extends
for derived classes
- Define with
- Exceptions
- create new exception by extending hte
Error
class - Exceptions are caught by Promise.catch, as we ll as try/catch blocks
- create new exception by extending hte
- Nested Functions
- can use symbols defined in the outer scope inside the inner function
- First-class functions
- use them as arguments:
Array.map(fn)
- return them as values
- nested function has access to the scope where it is defined
- use them as arguments:
- Arrow Functions
- evaluated to a function
- Template Literals with string interpolation
- evaluated in surrounding scope
- Module Systems
- CommonJS module system used by NodeJS created in 2009
- Frontend community adopted CommonJS while waiting for version ES6