- spread: ひろげる
スプレッド構文:
declare var arr1, arr2 : Array<any>; let concatenated = [...arr1, ...arr2];
// compliler option '-downlevelIteration' is maybe needed declare var str : string; const splitedCharArray = [...str];
残余引数:
function foo(first, ...restArgs) { // ... }
分割代入:
let [first, ...rest] = [1, 2, 3, 4] // first = 1 // rest = [2, 3, 4]