ES6 new features
http://es6-features.org/#Constants
ES6 New Features
Let, Const
Class
Arrow Function
Spread Operator and Destructing
Modules
Promise
Symbol
Typed Arrays
Internationalization & Localization
Class
Exports & Imports
Default export
Named export
You can choose the name when import
Name is defined by export
import person from "./person.js"
import {person as Person} from "./utility.js"
import * as bundle from "./utility.js"
Spread & Rest Operators ...
...
Spread
Rest
Used to split up array elements OR object properties
Used to merge a list of function arguments into an array
const newObject = {...oldObject, newProp: 5};
function sortArgs(...) {return args.sort();}
Destructuring
Easily extract array elements or object properties and store them in variables
Array Destructuring
Object Destructuring
[a, b] = ["Hello", "Harry"];
{name} = {name: "Harry", gender: "male"};
Declaration
Last updated
Was this helpful?