分割代入
配列・オブジェクトからデータを取り出す
var arr = ["one", "two", "three"];
// es5
var one = arr[0];
var two = arr[1];
var three = arr[2];
// es2015
var [one, two, three] = arr;
モジュールを使う
//es2015 module
import {a, b} from "./module";
export var c = 1;
//commonJS module
var module = require("./module");
var a = module.a;
var b = module.b;
exports.c = 1;