Slide 37
Slide 37 text
Axel @rauschma Frosty @js_dev #FluentConf
Spread operator (...):
array elements
let a = [1, ...[2,3], 4]; // [1, 2, 3, 4]
// Concatenate arrays
let x = ['a', 'b'];
let y = ['c'];
let z = ['d', 'e'];
let xyz = [...x, ...y, ...z];
// ['a', 'b', 'c', 'd', 'e']
// Convert iterable objects to arrays
let set = new Set([11, -1, 6]);
let arr = [...set]; // [11, -1, 6]
37